Setting Up the Development Version of R

[This article was first published on Category: R | John Ramey, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.

Lists

Unordered

* Item 1
* Item 2
  * Item 2a
  * Item 2b

Ordered

1. Item 1
2. Item 2
3. Item 3
   * Item 3a
   * Item 3b

Miscellaneous

Images

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

Links

http://github.com - automatic!
[GitHub](http://github.com)

Blockquotes

As Kanye West said:

> We're living the future so
> the present is our past.

Code Examples in Markdown

Syntax highlighting with GFM

```javascript
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```

Or, indent your code 4 spaces

Here is a Python code example
without syntax highlighting:

    def foo:
      if not bar:
        return true

Inline code for comments

I think you should use an
`<addr>` element here instead.
Something went wrong with that request. Please try again.

Looking for the GitHub logo?

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 their blog: Category: R | John Ramey.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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)