At Fred Hutchinson, my colleagues often utilize the development version of R, known as R-devel, and have encouraged me to follow suit. In this post, I’ll outline how I’ve configured the development version of R on our Linux server, which I access remotely due to its superior performance compared to my Mac.

To begin, I fetched the R-devel source code using Subversion and stored it in ~/local/ (equivalent to /home/jramey/local/), then proceeded to configure and compile the source. If you’re building from source, I recommend checking out these Subversion tips. Below are the commands I used 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 is crucial as it downloads the recommended R packages, which are not included in the SVN repository. For further details, refer to this resource.

While we have the release version (currently 2.15.1) installed in /usr/local/bin, our objective is to prioritize R-devel. To achieve this, I appended the following lines 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'

Note the inclusion of the final line in ~/.bashrc, ensuring that R-devel is loaded quietly without saving or restoring.

Subsequently, I proceeded to install the R packages I frequently use:

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

Following this, I updated my .Rprofile file, which I maintain in a GitHub gist.

Lastly, given our focus on flow cytometry data, and our group’s maintenance of several Bioconductor packages related to this domain, installing these packages is straightforward. We typically install the flowWorkspace package in R using the following command:

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