[R] Access Data Base Reading on Linux Platform
marc_schwartz at me.com
Mon Jul 31 14:11:00 CEST 2017
> On Jul 31, 2017, at 5:51 AM, Lorenzo Isella <lorenzo.isella at gmail.com> wrote:
> Dear All,
> I am really far from a database expert (I do prefer flat files as long as
> that is reasonable), but I have to deal with an accdb database (Microsoft
> Access new format). It all stems from the fact that I run R almost
> exclusively on Debian platforms.
> I did a bit of googling
> but it seems you cannot go very far unless you can install some microsoft
> drivers on your platform.
> Hence, my two questions
> 1) Can I read (I do not need write permissions) an accdb database on linux
> using R without resorting to WINE?
> 2) If 1) is cumbersome, to what R friendly format (excluding for now a csv
> dump) I can convert the data base? If this is doable entirely in Linux?
> Otherwise, worse comes to worse, how to make this one time conversion from
> Windows? I read there are ways from Access to convert everything to mdb,
> which should be more R friendly, but I need the opinion of someone more
> experienced than me here.
> Many thanks
As an FYI for future reference, there is a dedicated R and DB list here:
That being said, you are likely better off trying to get the data either in MS Excel formats, for which there are cross-platform R packages on CRAN that can help read the XLS/XLSX data or get CSV files which are easily read in R.
There is a utility called MDBTools (https://github.com/brianb/mdbtools), but it only supports the older MDB file format.
A couple of alternatives would be:
Use MDBOpener.com (http://www.mdbopener.com), which provides an online conversion tool where you can then export the data from the ACCDB file to either Excel or CSV files, if the source of the data cannot do it for you.
Use Jackcess (http://jackcess.sourceforge.net) which is a Java based library to create an application which could be called within R. This would be more cumbersome that the aforementioned options and would depend upon how much work you want to do to avoid the Excel or CSV based approach.
I have not used any of the above, so cannot speak for either ease of use or the validity of the tools.
There is also a general resource here:
The OpenOffice/LibreOffice based options listed there are likely more work than they are worth.
More information about the R-help