To read tables that are within a Microsoft Access Database, R needs the mdb-tools
executables mdb-tables
, mdb-schema
, and mdb-export
to be installed and in the system path. Since compiling those is not trivial, I have provided the binaries here, which I compiled from mdb-tools
version 0.6pre1. Support is for Access 97 (Jet 3) and Access 2000/2002 (JET4) formats.
USE AT YOUR OWN RISK. You need to know what you are doing.
- Download the necessary mdb-tools binaries and untar in /usr/local/bin.
- Download the mdb libraries and untar in /usr/local/lib.
- If you don't have those, download glibs and intllibs and untar in /usr/local/lib.
For testing, you can download a sample MS Access Database from anywhere, for example here.
In R you need to load library (Hmisc)
and use mdb.get.
No TweetBacks yet. (Be the first to Tweet this post)
This worked for me, thanks! Tried compiling from source and never could get it to work, so I'm glad this option is here.
Worked for me, too. Many thanks, Claudia!
Thank you very much! It works!
Where is mdb-ver? Could you add it into archive?
Works in Mac OS 10.8.2, R 15.1, Hmisc 3.10-1.
Thanks!!!
same set up as agustin, and it worked for me;
For what it is worth, here are some more detailed instructions for average users who don't use terminal:
be sure that (1) above goes in the bin folder and (2) and (3) in the lib folder. That is, notice there is a directory difference in the instructions above.
To find the directories mentioned above in finder, hit cmd-f to bring up a search, type name:usr, and then select "system files, are included", from the drop down menu. From the search results, be sure to pick the usr folder that is at the root directory.
Now put the unzipped contents into their respective bin and lib folders. Do not copy over the parent folder from the untarred files, just the contents that are nested in those folders.
Thanks! Still works like a charm! (Oct 21, 2013) with these specs:
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit) ##
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
other attached packages:
[1] Hmisc_3.12-2
This worked great (MacOS 10.9.2. R 3.0.2., and hmisc 3.14-3). Thank you very much.
I downloaded files into the proper folders, but now receive the error:
dyld: Library not loaded: /usr/local/lib/libglib-2.0.0.dylib
Referenced from: /usr/local/bin/mdb-tables
Reason: image not found
on R 3.1.1 and OS 10.9.5 and Hmisc 3.14-5
The first thing to check is if you have /usr/local/lib/libglib-2.0.0.dylib. If not, did you download them (see Step 3.) ?