Generic R 26

From GBWiki

Jump to: navigation, search


Contents

Introduction

Phenyx 2.6 requires R statistical package for a number of features, such as:

  • The Phenyx quantitation module
    • Phenyx 2.6 includes a new quantitation module that relies on the R software for the computation of p-value and other statistics. The Phenyx quantitation module is functional when R is not installed (i.e. it will report ratios) but will however not be able to perform statistical tests on the ratios.
  • The Error distribution report



This manual explains the installation procedure of R and RServe. Please note that the installation requires root access to the Phenyx host server. The installation is a two step process: The first step consist in the installation of the core of the R software. The second step consist in the installation of RServe, a service that is used for the communication between R and Phenyx

Installation on rpm based Linux Distributions (RedHat, CentOS, Suse)

R core Installation

R rpms are available from CRAN. Please choose your closest mirror from the list and follow instructions for your distribution. When the installation process is completed, please check that R shared library exists and is properly installed. It is located in $RHOME/bin and is named libR.so or libR.dylib. This library is required by RServe. If it is missing, get an R distribution with shared library included or compile R with --enable-R-shlib configure flag.

Suse

Follow these instructions.

RedHat/CentOs/Fedora

Download the R rpm and type the following command as root to install it:

 rpm -Uvh R-<version>.<distributiom>.<architecture>.rpm 

The R rpm has dependencies on other rpms that you may therefore have to install. Please follow the instructions given by the rpm manager when typing the previous command.

RServe Installation

The easiest way to install Rserve is to install it from CRAN, simply type the following command in R:

 install.packages("Rserve")  

An alternative way is to use a source package for R. Download the package file Rserve_0.5-2.tar.gz and type the following command as root to install the R RServe package:

 R CMD INSTALL Rserve_0.5-2.tar.gz

This should compile and install Rserve. You can check whether Rserve is installed correctly by looking in the $RHOME/bin directory - there should be a file called Rserve. If the compilation fails, please check that R shared library exists and is properly installed. It is located in $RHOME/bin and is named libR.so or libR.dylib. If it is missing, get an R distribution with shared library included or compile R with --enable-R-shlib configure flag.

Please follow this link for additional instructions.

Installation on Debian based Linux Distributions (Debian, Ubuntu)

R core Installation

Install the package R-base-core. The installation can be performed under Ubuntu with Synaptic (the Ubuntu package manager) or by typing the following command in a UNIX shell as root.

 apt-get install r-base-core

Follow this link to get additional installation instructions.

RServe Installation

Install the following package:

r-cran-rserve

This installation can be performed under Ubuntu with Synaptic (the Ubuntu package manager) or by typing the following command in a UNIX shell as root.

 apt-get install r-cran-rserve

Start the RServe daemon

Type the following commands in a UNIX shell as phenyx

To set the R home directoy:

 export R_HOME=/usr/lib/R

You may also need to add the following in your .bashr or .profile:

 if [ -n "$LD_LIBRARY_PATH" ]; then
   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/R/lib
 else
   export LD_LIBRARY_PATH=/usr/lib/R/lib
 fi

To manually start the RServe daemon from R:

 R CMD Rserve

Alternatively you can type the following command to start directly the RServe daemon:

 $R_HOME/bin/Rserve

Note: you may want to automatize the RServe startup so that it is started at boot time.

Personal tools
Create a book