I’ve recently started working with R on 64-bit Macs with enough RAM to make a 64-bit binary worth using. You can download R compiled for the x86_64 platform here. (It will install a new GUI application called R64.app. Make sure you run that one.) But when I went to load one of the modules I use the most, RMySQL, which allows you to load data frames directly as the result of a MySQL query, I found that the x86_64 binary version from CRAN didn’t work. The solution?
- Download and install MySQL. Make sure you get the x86_64 version. As of this writing, it’s labeled “Mac OS X 10.5 (x86_64).” You don’t need to install the startup item for this to work, just the main package.
- Download the source package of RMySQL.
- Open a terminal and navigate to the directory where the RMySQL tar.gz file was downloaded.
-
Run the following command:
R CMD INSTALL --configure-args='--with-mysql-dir=/usr/local/mysql' \ RMySQL_0.7-4.tar.gz
That command is correct with the current version of RMySQL (0.7-4) and the default install location for MySQL (/usr/local/mysql). Change those values as appropriate if you have a different version or different install location.