Skip to content

Instantly share code, notes, and snippets.

View yht's full-sized avatar
🎯
Focusing

Yudha Ha Te yht

🎯
Focusing
View GitHub Profile
@dainiuxt
dainiuxt / MSAccessDBConnection.r
Last active November 20, 2019 14:56
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.