Tuesday, 2 December 2014

Getting the seewave R package installed on Mac OS X Yosemite

The seewave package for R first requires you to install the fftw library (on your system, not in R), instructions for this can be found here: Installing fftw on Mac OS X Yosemite.

At present it is not possible to use install.packages() to download seewave on the 3.1 branch of R. To see what version(s) of R you have on your system run the following command from the Terminal:

ls -l /Library/Frameworks/R.framework/Versions/

This will give an output similar to:

drwxrwxr-x  6 root  admin  204  2 Dec 11:31 3.0
drwxrwxr-x  6 root  admin  204  3 Nov 16:50 3.1
lrwxr-xr-x  1 root  admin    3  2 Dec 11:31 Current -> 3.0

This shows that my system has two versions of R, 3.0 and 3.1, installed and the current default version is 3.0. If you do not have 3.0 installed you can download R version 3.0 branch from here.

To set the current version of R to 3.0 if you have it already installed you just need to change the symbolic link 'Current' to the correct version:

cd /Library/Frameworks/R.framework/Versions 
ln -sfn 3.0 Current

You can then use install.packages() in R to install the seewave package:

install.packages(c("fftw","tuneR","rgl","rpanel"), repos="http://cran.at.r-project.org/")

install.packages("seewave", repos="http://cran.at.r-project.org/")