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

August 9, 2012
By

(This article was first published on The Ubuntu R Blog, and kindly contributed to R-bloggers)

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

To leave a comment for the author, please follow the link and comment on their blog: The Ubuntu R Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)