How to read data from Microsoft Access .accdb database files into R?

前端 未结 8 1130
夕颜
夕颜 2020-12-16 14:05

The RODBC documentation suggests it is possible, but I am not sure how to read data from a Microsoft Access (the new .accdb format) file with this package into

8条回答
  •  一生所求
    2020-12-16 14:26

    library(RODBC)
    db<-file.path("student.accdb")
    channel<-odbcConnectAccess2007(db)
    data<-sqlFetch(channel,"stud")
    
    data
      ID  Name M1 M2 M3 M4 M5 Result
    1  7 Radha 85 65 92 50 62   Pass
    2  8  Reka 75 85 96 75 85   Pass
    

提交回复
热议问题