dainiuxt
6/10/2014 - 5:31 AM

Connect MS Access database to R (RStudio) in Windows

Connect MS Access database to R (RStudio) in Windows

library("RODBC") #load package
db<-file.path("C:/path/to/your/database.accdb") #connect database.
#Note the UNIX style slash (/). "\" is "escape character" so all "\"you should replace either with "/" or "\\"
channel<-odbcConnectAccess2007(db) #internal RODBC function
dataSetName<-sqlFetch(channel,"TableName") #read particular table from Access database file.