Setting Up the Development Version of R

August 28, 2012
By

(This article was first published on Category: R | John Ramey, and kindly contributed to R-bloggers)

My coworkers at Fred Hutchinson regularly use the development version of R (i.e., R-devel) and have urged me to do the same. This post details how I have set up the development version of R on our Linux server, which I use remotely because it is much faster than my Mac.

First, I downloaded the R-devel source into ~/local/, which is short for /home/jramey/local/ via Subversion, configured my installation, and compiled the source. I recommend these Subversion tips if you are building from source. Here are the commands to install R-devel.

bash svn co https://svn.r-project.org/R/trunk ~/local/R-devel cd ~/local/R-devel ./tools/rsync-recommended ./configure --prefix=/home/jramey/local/ make make install

The third command downloads the recommended R packages and is crucial because the source for the recommended R packages is not included in the SVN repository. For more about this, go here.

We have the release version (currently, it is 2.15.1) installed in /usr/local/bin. But the goal here is to give priority to R-devel. So, I add the following to my ~/.bashrc file:

``` bash PATH=~/local/bin:$PATH export PATH

Never save or restore when running R

alias R=’R –no-save –no-restore-data –quiet’ ```

Notice that the last line that I add to my ~/.bashrc file is to load R-devel quietly without saving or restoring.

Next, I install the R packages that I use the most.

r install.packages(c('devtools', 'ProjectTemplate', 'knitr', 'ggplot2', 'reshape2', 'plyr', 'Rcpp', 'mvtnorm', 'caret'), dep = TRUE)

Then, I update my .Rprofile file, which I keep in a Github gist.

Finally, my coworkers focus on flow cytometry data, and our group maintains several Bioconductor packages related to this type of data. To install the majority of them, we simply install the flowWorkspace package in R:

r source("http://bioconductor.org/biocLite.R") biocLite("flowWorkspace")

To leave a comment for the author, please follow the link and comment on his blog: Category: R | John Ramey.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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.