Wednesday, April 20, 2011

Ubuntu with RStudio - Upgrading to R 2.13.0

Its been a while since I posted. Mostly because there are no readers :)
(BTW - I still have my iPhone. iOS4 is pretty darn good, not sure about that AT&T)

I run Ubuntu 10.4 still. I have a VM with 11.04 on it for testing purposes, but I'm not ready to leave 10.4. However there are new versions R and RStudio available. I checked the Ubuntu repositories, but they were stuck on R2.10. I considered the OS upgrades, even to 11.04, but that had R 2.12 which meant I was going to have to upgrade something anyway. I considered not upgrading but my current version of R was having some issues. The biggest issue for me was that I could not install ggplot2 successfully with my installed version. As graphs are important part communicating the data I review I chose the upgrade as the required option. Besides, I like new stuff. So went ahead a downloaded the R source.

If you only want to use R on the command line, then its a build like any other build and you can stop reading. Remove the synaptic version, then unpack, build, and install, have fun.

I followed the online instructions for R and then installed the latest version of RStudio(93.84). It reported no errors during the installation, but when I tried to start it, I got a rather cryptic error message.
It said something like did I enable enable-R-shlib? But it didn't say if I should or should not have enabled it. Turns out you should if you want to use RStudio.

Simply do the include the --enable-R-shlib in your configure statement:
./configure --enable-R-shlib
then
make
sudo make install
Now RStudio runs, which is good but there is more.
If you want to run the byte code compiler, you have to compile that as an extra step, which is in the docs.
One the reason I wanted to upgrade RStudio was to use the library Manipulate. The documentation for RStudio says it comes with Manipulate which lets you do interactive plotting. It also says RStudio with with any version R compiled from source. However, I get this error message now:
Warning in install.packages :
package ‘manipulate’ is not available (for R version 2.13.0)

I guess I will not be using this feature for now. I did get ggplot2 to work with this setup.

I'll follow up on my future use of R with RStudio.

1 comment:

  1. Thanks for this. Please post if you get library Manipulate to work.
    Thanks.

    ReplyDelete