Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export R data frame to MS Access

Tags:

r

I am trying to export a data frame from R to MS Access but it seems to me that there is no package available to do this task. Is there a way to export a data frame directly to Access? Any help will be greatly appreciated.

like image 769
Saurabh Datta Avatar asked Nov 29 '25 06:11

Saurabh Datta


1 Answers

The following works for medium sized datasets, but may fail if MyRdataFrame is too large for the 2GB limit of Access or conversion type errors.

 library(RODBC)

 db <- "C:Documents/PreviouslySavedBlank.accdb"

 Mycon <- odbcConnectAccess2007(db)

 sqlSave(Mycon, MyRdataFrame)
like image 76
A nonymous Avatar answered Dec 01 '25 20:12

A nonymous