Category Archives: Ubuntu

Installing the Development Version of R on Ubuntu (alongside the current version of R)

A recent question was asked on the R-sig-Debian on installing the development version of R alongside the stable version. While most users of R do not need to have two versions installed on their machine, it is useful if you are developing packages for CRAN and want to test your package.

The latest development version of R is not available as a Ubuntu package, so it will need to be built from source. Before you build from source, you will need to make sure that all the compilers and libraries needed to build R are available. Since the development version is similar to the current version of R, the following commands will install all the packages you need (plus a couple more).

 sudo apt-get build-dep r-base sudo apt-get install subversion ccache 

The next steps were suggested by Dirk Eddelbuettel. First, you need to download the current version of r-devel from svn. Create a directory for the r-devel code. The scripts below use the path “~/svn” and if you want to change the location, you will need to make the appropriate changes in all the scripts.

 mkdir ~/svn/ 

Now checkout the current r-devel code from svn.

 cd ~/svn/ svn co https://svn.r-project.org/R/trunk r-devel/R 

The svn checkout will take some time. Next you need a script that will build r-devel, but install it in a location different from the stable version of R. Again, thanks to Dirk, here is that script. Note that the executable is installed in “/usr/local/lib/R-devel/bin”, but that can be changed.

A second script (that you should place in the appropriate location) will allow you to easily launch the development version of R.

R 2.15.1 Available

Ubuntu packages for the latest release of R are now available on CRAN and RutteR PPA. If you have either repository installed, Ubuntu should have updated R automatically. If you do not have either repository isnallted, see the Installing R tab above.

The announcment from the R Core Team about 2.15.1 can be found here.

For Ubuntu (and Debian) users, the following has also been added:

  • src/X11/*: Applied revised patch by Philip Johnson to to set the X11 icon and window class for improved desktop experience; patch source and support files are in debian/icon-class-patch/.
  • debian/rules: Install icon png file and desktop file from Philip too
  • debian/r-base-core.dirs: Add two directories for icon and desktop

In short, this means when you create windows from within R, the R logo will appear in the window title bar (if your desktop has that feature enabled) and in any application that manages your windows.