0

I have downloaded a file called "database.sqlite" from "https://www.kaggle.com/benhamner/d/kaggle/college-scorecard/exploring-the-us-college-scorecard-data" .I have to connect the database to R but i don't know how to run the file or create database and use the data from that file .I use mac and SQLite version is 3.8.5.Any help is highly appreciated.

cchamberlain
  • 17,444
  • 7
  • 59
  • 72

1 Answers1

1

hi you can easily find a sample like this referenced from here

library("RSQLite")
con = dbConnect(drv="SQLite", dbname="country.sqlite")
alltables = dbListTables(con)
p1 = dbGetQuery( con,'select * from populationtable' )
p2 = dbGetQuery( con,'select count(*) from areastable' )
p3 = dbGetQuery(con, "SELECT population WHERE DATE(timeStamp) < DATE('now', 'weekday 0', '-7 days')")
dbClearResult(p3)
p4 = dbGetQuery(con, "select * from populationtable where jobdescription like '%manager%'")
Raghavendra
  • 1,419
  • 4
  • 19
  • 28