Difference between revisions of "R"

From HPC
(New page: '''This is work in progress.''' == General remarks == It is necessary to install R locally in your home directory. This puts you in control of the version installed, the packages installe...)
 
m (System-wide install)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''This is work in progress.'''
+
== Personalised install ==
  
== General remarks ==
+
You may want to install R locally in your home directory. This puts you in control of the version installed, the packages installed and you can tweak the installation according to your needs. Consequently, before you can use R, you have to do the following:
It is necessary to install R locally in your home directory. This puts you in control of the version installed, the packages installed and you can tweak the installation according to your needs.
 
Consequently, before we can use R, we have to do the following:
 
  
- Install R [http://www.r-project.org/] (download from [http://cran.za.r-project.org/]) and the relevant packages;
+
* Install R and the relevant packages
 +
* Write the code to be executed on the cluster
 +
* Write the submit script to be submitted via qsub
  
- Write the code to be executed on the cluster;
+
== System-wide install ==
  
- Write the submit script to be submitted via qsub;
+
The system-wide install of R has been compiled and installed with the commands given below. If this is sufficient for your purposes, you don't have to install your own version in your home directory. Available in '''/apps/R/3.0.2'''. Feel free to ask for extra modules to be loaded.
  
Below each of these steps is documented in detail.
+
<pre>
 +
$ ./configure --prefix=/apps/R/3.0.2 --enable-R-shlib --with-system-zlib --with-system-bzlib --with-system-pcre --with-x=no
 +
$ make
 +
$ make check
 +
$ make install
 +
</pre>
  
== Installation of R and necessary packages ==
+
=== Rmpi 0.6-3 ===
  
== Submit script ==
+
<pre>
 +
$ module load openmpi-x86_64
 +
$ /apps/R/3.0.2/bin/R CMD INSTALL \
 +
    -l /apps/R/3.0.2/lib64/R/library/ \
 +
    --configure-args="--with-mpi=$MPI_HOME --with-Rmpi-libpath=$MPI_LIB --with-Rmpi-include=$MPI_INCLUDE --with-Rmpi-type=OPENMPI" \
 +
  Rmpi_0.6-3.tar.gz
 +
</pre>
  
== Example ==
+
=== biomod2 3.1-25 ===
  
 +
<pre>
 +
$ for i in abind_1.4-0.tar.gz mda_0.4-4.tar.gz plyr_1.8.tar.gz pROC_1.5.4.tar.gz randomForest_4.6-7.tar.gz \
 +
      RColorBrewer_1.0-5.tar.gz latticeExtra_0.6-26.tar.gz gbm_2.1.tar.gz hexbin_1.26.3.tar.gz sp_1.0-14.tar.gz \
 +
      raster_2.1-66.tar.gz zoo_1.7-10.tar.gz rasterVis_0.24.tar.gz biomod2_3.1-25.tar.gz; do
 +
    /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ $i;
 +
  done
 +
</pre>
  
 +
=== plyr 1.8.1 ===
  
----
+
<pre>
 +
$ for i in Rcpp_0.11.1.tar.gz plyr_1.8.1.tar.gz; do
 +
    /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ $i;
 +
  done
 +
</pre>
  
--[[User:Rkrug|rkrug]] 07:22, 19 December 2008 (UTC)
+
=== foreign 0.8-61 ===
 +
 
 +
<pre>
 +
$ /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ foreign_0.8-61.tar.gz
 +
</pre>

Latest revision as of 11:02, 1 April 2014

Personalised install

You may want to install R locally in your home directory. This puts you in control of the version installed, the packages installed and you can tweak the installation according to your needs. Consequently, before you can use R, you have to do the following:

  • Install R and the relevant packages
  • Write the code to be executed on the cluster
  • Write the submit script to be submitted via qsub

System-wide install

The system-wide install of R has been compiled and installed with the commands given below. If this is sufficient for your purposes, you don't have to install your own version in your home directory. Available in /apps/R/3.0.2. Feel free to ask for extra modules to be loaded.

$ ./configure --prefix=/apps/R/3.0.2 --enable-R-shlib --with-system-zlib --with-system-bzlib --with-system-pcre --with-x=no
$ make
$ make check
$ make install

Rmpi 0.6-3

$ module load openmpi-x86_64
$ /apps/R/3.0.2/bin/R CMD INSTALL \
    -l /apps/R/3.0.2/lib64/R/library/ \
    --configure-args="--with-mpi=$MPI_HOME --with-Rmpi-libpath=$MPI_LIB --with-Rmpi-include=$MPI_INCLUDE --with-Rmpi-type=OPENMPI" \
  Rmpi_0.6-3.tar.gz

biomod2 3.1-25

$ for i in abind_1.4-0.tar.gz mda_0.4-4.tar.gz plyr_1.8.tar.gz pROC_1.5.4.tar.gz randomForest_4.6-7.tar.gz \ 
      RColorBrewer_1.0-5.tar.gz latticeExtra_0.6-26.tar.gz gbm_2.1.tar.gz hexbin_1.26.3.tar.gz sp_1.0-14.tar.gz \ 
      raster_2.1-66.tar.gz zoo_1.7-10.tar.gz rasterVis_0.24.tar.gz biomod2_3.1-25.tar.gz; do
    /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ $i; 
  done

plyr 1.8.1

$ for i in Rcpp_0.11.1.tar.gz plyr_1.8.1.tar.gz; do
    /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ $i;
  done

foreign 0.8-61

$ /apps/R/3.0.2/bin/R CMD INSTALL -l /apps/R/3.0.2/lib64/R/library/ foreign_0.8-61.tar.gz