Skip to content

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)

Categories: R.

Tags: ,

Comment Feed

7 Responses

  1. This worked for me, thanks! Tried compiling from source and never could get it to work, so I'm glad this option is here.

  2. Worked for me, too. Many thanks, Claudia!

  3. Thank you very much! It works!
    Where is mdb-ver? Could you add it into archive?

  4. Works in Mac OS 10.8.2, R 15.1, Hmisc 3.10-1.

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

  6. 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) ##
    [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

  7. This worked great (MacOS 10.9.2. R 3.0.2., and hmisc 3.14-3). Thank you very much.

Some HTML is OK

or, reply to this post via trackback.