This page describes how to install software necessary for participating in the course on R and Bioconductor. It is important that you arrive at the course with this software pre-installed, we will not have time to help with installation questions at the course. On the other hand, we will try to help as much as possible via. email.

Please direct all questions to Kasper Daniel Hansen at (khansen AT stat dot berkeley dot edu). He wil be travelling in the final weekend before the course, so aim to have completed the installation no later than Friday the 2nd of November.

The installation consist of 3 steps:

  1. Installing R.
  2. Installing add-on packages for R, including Bioconductor.
  3. Other stuff.

1. Installing R

We will be using R version 2.6.0 (or 2.6.0-patched). Binaries for the major operating systems (Linux, Mac OS X and Windows) may be found at CRAN. Installing R should be straightforward on most platforms.

Users running Windows Vista may have problems with permissions, please check the information in item 2.24 in the R for Windows FAQ

In the case of some Linux distributions you may be compiling R from source. This requires a number of necessary tools (X.org sources, GCC, gfortran, and others). We advise against compiling R from source on Mac OS X, use the binary instead.

2. Installing Bioconductor and additional packages

We need a large number of packages from Bioconductor and CRAN. In order to make it easy to install these packages we have provided a small script. For this to work, it is important to make sure you are running R-2.6.0 (or R-2.6.0-patched). Please read all of this section before starting, especially the last remarks regarding special issues for Mac OS X and Linux. The highest chance of success is to make a clean installation of R-2.6.0 and proceed as described below.

You will need to have internet access from your laptop, and the download will be fairly big, so we advise to do it somewhere with a decent internet connection. Start R and type the following at the command prompt:

R> source("http://www.math.ku.dk/~richard/courses/bioconductor2007/copenhagen.R")

(most likely you will see > and not R>.)

If you have problems connecting R to the internet, consider the following:

What you do next depends on whether or not you already have parts of Bioconductor installed. The installation script installs everything you need, but it happens no matter what you have already installed. So, to start of do a

R> copenhagen("check")

to see what packages you already have installed. If this list is long (which it probably is), use the copenhagen script to run the installation by doing

R> copenhagen("install.all")

This may take some time. After this has completed, run

R> copenhagen("check")

to see that you have everything you need. If something is wrong you may retry the complete installation step above or see below how to proceed. Finally, if everything went well you load the required packages by

R> copenhagen("load")

What if something went wrong - and how do I install a few packages?

If some packages failed and you need to retry installing them (it could fail simply because of download problems), you can install the remaining packages (without installing everything that has already been installed) by

R> copenhagen("install")

This call will check if the packages have been installed and install only those that have not been installed. Alternatively, individual packages can be installed by hand by first running

R> copenhagen("check")

to get a list of these packages and then do the following:

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

followed by

R> biocLite("PACKAGE-NAME")

Installing packages in a non-standard location

Perhaps you want to install your packages in a non-standard location, either because of permission problems or because you want to be able to delete some of these packages after the course. The easiest way is to create some directory somewhere and then execute

R> .libPaths("myDir")

with myDir being the directory (note that R uses / as a directory separator even on windows). You can type .libPaths() to see what the setting is, your custom directory should be at the top of the list.

Windows issues

Most packages are a breeze to install in Windows. A few R/Bioconductor packages do not work under Windows, we will not be using those in this course.

Mac OS X issues

The easiest thing for Mac OS X users is to install binary versions of the various packages. Check whether this is the case by

R> options("pkgType")

the answer should be mac.binary. You can set it by

R> options(pkgType = "mac.binary")

You will also need to install the binary version of Graphviz matching Rgraphviz from Bioconductor. You will find this program at R for Mac OS X, scroll to the bottom. It is a DMG image which is straigtforward to install.

Note: If you really want to have the possibility of compiling packages from source, you will need the newest version of Xcode installed from Apple. This will require creating an account with their developers network. In addition you might need a fortran compiler, which you can get from the DMG image of R from CRAN (click "customize" during the installation session - it is easy to miss). You will also need the sources for Graphviz, from graphviz.org (use an even numbered version, preferably version 2.12 or 2.14)

Linux issues

For installing packages under Linux you will (at least) need the following tools:

These libraries are part of most Linux distributions. Please email for help on these issues, and remember to report as much information as possible.

In some Linux distributions there is both say a libxml2 and a libxml2-dev package. In most cases you will need the development version as well.

3. Other issues

During the course you will enter a lot of R code. It will be useful to have a reasonable editor available. What you use depends on your past experience, and operating system. It can be as simple as Notepad for Windows. Popular editors include

but please make sure that you do not start using a completely new editor at the course: the aim is to learn R, learning a new editor at the same time would be counterproductive.

Check here Friday the 2nd

Experience tells us that there are always minor last-minute changes to packages - sometimes bugs are discovered etc. Any updates will be detailed below (perhaps you will need to refresh the page in your browser):