Update: Installing R and XCMS (OpenSuse11.2)

(*14.Dec.’09: Minor update, see point 3 at the bottom about installing “multtest”).

I recently switched from KUbuntu to OpenSuse, and had to install R and XCMS again. And again, it proved difficult.

1) R is easily installed from the links to the one-click-install packages on the R-Project web page, or one of their mirrors. (I used the one from the University of Bergen, but you should be able to find the same packages under any of the mirror-sites listed at http://cran.r-project.org/mirrors.html ). Just look for section 1.1: “Directly installing R from this page (preferred)”.

2) Now, for the XCMS packages. This proved more difficult, but it worked in the end. What to try:

Start R, and run the following commands in it (Note, if this does not complete successfully, don’t worry, we’ll get to that):


(source/for more info: see the bioconductor.org page for xcms)

You MAY have everything you need, and it MAY work out fine (if so, you can jump to point 3), or you may like me, need to get some extra libraries such as NetCDF and zlib for the install to work.

Get NetCDF from here (Direct link to the gzipped tar-file).
Download that, place it in a directory, and run the following commands in the console to install it:

tar -xzf netcdf-4.0.1.tar.gz
cd netcdf-4.0.1
#"--prefix..." is optional # (installs in a
# directory other than the current):
./configure --prefix=/usr/local
sudo make install

This may work for you. If so, attempt to install XCMS from within R again. I was missing the programs to compile the code, and to run “make” and “make install” here, on my brand new installation. If you’re in the same situation, install the needed programs as follows:

.c) Installing GCC and MAKE:
Run the following commands in the console:

# Installs the Gnu C Compiler
sudo zypper install gcc
# Installs the "make"-utility
sudo zypper install make
sudo zypper install gcc-c++

There. Now you should repeat point 2(b) again, and then 2(a). I was missing zlib too, so the installation still would not complete.

.d) Getting and installing zlib-devel:
You can find zlib in the the OpenSuse build service, BUT what you want for this to work is the DEVEL-version, so search for the packages “zlib-devel”, and use what corresponds to your system. This package (direct link) worked for me (zlib-devel-1.2.3-140.2.i586.rpm for OpenSuse 11.2).

Now run point (2.a) again, and XCMS should be installed.

3) Xcms should now be installed. You can check that it is available for loading into R with the command:


If you just get a blank new line with a “>”, and no error, Great. Congratulations, xcms is now loaded into R.

You can get a good introductory example to using XCMS here (pdf). NOTE: To run the example, you need the datasets from faahKO, which can be installed directly from within R like this:


*UPDATE: You will also need the R-package “multtest” to run the example. Some info about it is provided here, or you can simply install it directly in R like this:


Hope this was helpful to someone out there! 🙂


About kjartanl

Systems Developer working near Bergen, Norway.
This entry was posted in Science & tech, Tips and tagged , , , , , , , , , , , . Bookmark the permalink.

One Response to Update: Installing R and XCMS (OpenSuse11.2)

  1. Thirumoorthy says:

    Kindly give me installation steps for xcms on windows..

    looking for your reply.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s