3

I am working with large datasets that are available in *.mdb (i.e access database) format. I am using RODBC R package to extract data from access database. I figured out that I have 32 bit office installed on my machine. Since, I have 32 bit office installed, it seems I can use only 32 bit R in order to connect to the access database using RODBC. After I read the data using 32 bit R, then doing some exploratory analysis (plotting data, summary / regression), I got the memory issues which I didn't get while using 64-bit R.

Currently, I am using Rstudio to run all my code and I could change the version of R that I use from Options >> Global Options >> R version:

However, I don't want to switch to 32-bit while reading access database using RODBC and then go back to R-studio to revert back to 64-bit for analysis. Is there an automatic solution which allows me to specify 32-bit or 64-bit ? Can we do that using batch file ? If anyone could shed some light that would be great.

Jd Baba
  • 5,948
  • 18
  • 62
  • 96

1 Answers1

2
  1. Write your code that extracts the data as one R script. Have that script save the output data that you need for your analysis to an .RData file.
  2. Write the code that you run your analyses in, to be run in 64-bit R. Using the answer found here, run your code using the 32-bit R. Then, the next line can be reading the data in from the .RData file. If needed to allow things to load, use Sys.sleep to have your first program wait a few seconds for the load to complete.
Community
  • 1
  • 1
TARehman
  • 6,659
  • 3
  • 33
  • 60