User Tools

Site Tools


r-software

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
r-software [2017/04/24 09:22] aorthr-software [2021/05/05 17:18] aorth
Line 4: Line 4:
 ===== Information ===== ===== Information =====
  
-  * Latest version3.3.3+  * Version4.0 (4.0.5)
   * Added: February, 2015   * Added: February, 2015
-  * Updated: April2017 +  * Updated: May2021 
-  * Link: http://www.r-project.org/+  * Link: https://www.r-project.org/
  
 ===== Usage ===== ===== Usage =====
  
-=== See versions of R which are available === +See versions of R that are available: 
-<code>module avail R</code>+<code>module avail R</code>
  
-===== Installation ====== +Load one version into your environment and run it: 
-Notes from the sysadmin during installation (also covers the installation of zlib, bzip2, xz, pcre, and curl, as they are needed by since ~3.3.x):+<code>$ module load R/4.
 +$ R</code>
  
-<code>$ cd /tmp +Use ''installed.packages()'' to check the list of packages installed in the ILRI environment by defaultHere is a good resource on [[https://www.osc.edu/resources/getting_started/howto/howto_install_local_r_packages|installing packages into user libraries]] if you need other packages.
-$ wget http://zlib.net/zlib-1.2.11.tar.xz +
-$ tar xf zlib-1.2.11.tar.xz +
-$ cd zlib-1.2.11 +
-./configure --prefix=/export/apps/zlib/1.2.11 +
-$ make +
-$ make check +
-$ sudo mkdir -p /export/apps/zlib/1.2.11 +
-$ sudo chown aorth /export/apps/zlib/1.2.11 +
-$ make install +
-$ sudo chown -root:root /export/apps/zlib/1.2.11+
  
-$ cd /tmp +===== Installation ====== 
-$ wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz +Notes from the sysadmin during installation.
-$ tar xf bzip2-1.0.6.tar.gz +
-$ cd bzip2-1.0.6 +
-$ make -f Makefile-libbz2_so +
-$ sudo mkdir -p /export/apps/bzip2/1.0.6 +
-$ sudo chown aorth /export/apps/bzip2/1.0.6 +
-$ make install PREFIX=/export/apps/bzip2/1.0.6 +
-$ sudo chown -R root:root /export/apps/bzip2/1.0.6+
  
-$ cd /tmp +First, compile the main R application with GCC 7 from Red Hat's ''devtoolset-7'' software collection:
-$ wget https://tukaani.org/xz/xz-5.2.3.tar.xz +
-$ tar xf xz-5.2.3.tar.xz +
-$ cd xz-5.2.3 +
-$ ./configure --prefix=/export/apps/xz/5.2.3 +
-$ make +
-$ make check +
-$ sudo mkdir -p /export/apps/xz/5.2.3 +
-$ sudo chown aorth /export/apps/xz/5.2.3 +
-$ make install +
-$ sudo chown -R root:root /export/apps/xz/5.2.3+
  
-$ cd /tmp +<code>$ cd /tmp 
-$ wget http://downloads.sourceforge.net/pcre/pcre-8.40.tar.bz2 +$ wget https://cran.r-project.org/src/base/R-4/R-4.0.5.tar.gz 
-$ tar xf pcre-8.40.tar.bz2 +$ tar xf R-4.0.5.tar.gz 
-$ cd pcre-8.40 +$ cd R-4.0.5 
-./configure --prefix=/export/apps/pcre/8.40 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline +# install packages to enable capabilities in R 
-$ make +sudo yum install libX11-devel libXaw-devel bzip2-devel libcurl-devel xz-devel readline-devel glibc-headers pcre2-devel.x86_64 
-$ make check +# install a newer compiler from Red Hat software collections 
-$ sudo mkdir -p /export/apps/pcre/8.40 +$ sudo yum install devtoolset-7-gcc devtoolset-7-gcc-gfortran devtoolset-7-libquadmath-devel devtoolset-7-gcc-c++ 
-$ sudo chown aorth /export/apps/pcre/8.40 +$ scl enable devtoolset-7 bash 
-$ make install +# R packages are written in C99 and GCC 7 uses a newer standard by default, so tell configure script to use C99 explicitly 
-$ sudo chown -R root:root /export/apps/pcre/8.40+$ export CFLAGS='-std=gnu99 -g -O2' 
 +$ ./configure --enable-R-shlib --prefix=/export/apps/R/4.0 
 +$ make -j4 
 +$ sudo mkdir -p /export/apps/R/4.0 
 +$ sudo chown aorth:aorth /export/apps/R/4.0 
 +$ make install</code>
  
-$ cd /tmp +Then install some common libraries used by our users because some of them are quite complicated, and installing them globally saves tens of thousands of header files and libraries being installed into user libraries anyways:
-$ tar xf curl-7.54.0.tar.gz +
-$ cd curl-7.54.0 +
-$ ./configure --enable-ipv6 --prefix=/export/apps/curl/7.54.0 +
-$ make +
-$ make check +
-$ sudo mkdir -p /export/apps/curl/7.54.0 +
-$ sudo chown aorth /export/apps/curl/7.54.0 +
-$ make install +
-$ sudo chown -R root:root /export/apps/curl/7.54.0+
  
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/export/apps/zlib/1.2.11/lib:/export/apps/bzip2/1.0.6/lib:/export/apps/xz/5.2.3/lib:/export/apps/pcre/8.40/lib:/export/apps/curl/7.54.0/lib LDFLAGS="$LDFLAGS -L/export/apps/zlib/1.2.11/lib -L/export/apps/bzip2/1.0.6/lib -L/export/apps/xz/5.2.3/lib -L/export/apps/pcre/8.40/lib -L/export/apps/curl/7.54.0/libCFLAGS="$CFLAGS -I/export/apps/zlib/1.2.11/include -I/export/apps/bzip2/1.0.6/include -I/export/apps/xz/5.2.3/include -I/export/apps/pcre/8.40/include -I/export/apps/curl/7.54.0/include" +<code>$ /export/apps/R/4.0/bin/
-$ wget https://cran.r-project.org/src/base/R-3/R-3.3.3.tar.gz +> install.packages('sf', repo='https://cloud.r-project.org', configure.args=c(sf = '--with-gdal-config=/export/apps/gdal/2.4.2/bin/gdal-config')) 
-$ tar xf R-3.3.3.tar.gz +> install.packages("hierfstat", repos="https://cran.r-project.org"
-$ cd R-3.3.3 +> install.packages("adegenet", repos="https://cran.r-project.org"
-$ ./configure --enable-R-shlib --prefix=/export/apps/R/3.3.3 +> install.packages("BiocManager", repos="https://cran.r-project.org"
-$ make -j4 +> install.packages("poppr", repos="https://cran.r-project.org") 
-$ make install +> install.packages("vcfR", repos="https://cran.r-project.org") 
-$ sudo mkdir -p /export/apps/R/3.3.3 +> install.packages("devtools", repos="https://cran.r-project.org") 
-$ sudo chown aorth /export/apps/R/3.3.3 +> library(devtools) 
-$ sudo chown -R root:root /export/apps/R/3.3.3 +> install_github("HenrikBengtsson/TopDom") 
-$ exit</code>+> install_github("lucidif/HiCeekR", repos=BiocManager::repositories()) 
 +> q() 
 +$ sudo chown -R root:root /export/apps/R/4.0</code> 
 + 
 +**Note:** some of these packages will need system libraries installed, for example: 
 +  * libgit2-devel.x86_64 
 +  * libjpeg-turbo-devel.x86_64 
 +  * gsl-devel.x86_64
r-software.txt · Last modified: 2023/07/12 06:39 by aorth