I am trying to write an open data package that reads New York State education data into R. That data are provided as an Access database.
I want to write a function that
How about just with RODBC? Can you also download and use the mdb file (e.g. to make queries/views directly inside the mdb?)
I usually load data from Access dbs into R with the following code chunk:
# read in the data
library(RODBC)
db <- odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};
DBQ=C:\\Path\\To\\Database\\my_db.accdb")
# Get data
data <- as_tibble(sqlFetch (db , "Table or Query Name", rownames=TRUE))