Read data from MS Access into R on Mac OS 10.5

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.

  1. Download the necessary mdb-tools binaries and untar in /usr/local/bin.
  2. Download the mdb libraries and untar in /usr/local/lib.
  3. 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)

9 thoughts on “Read data from MS Access into R on Mac OS 10.5”

  1. 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.

  2. 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

  3. 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

    1. 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.) ?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>