R Modules Available

SciComp creates R modules for every version of R. There are two modules for each version of R released. A base module, e.g. R/4.1.1 and a local Fred Hutch module, e.g. fhR/4.1.1. The fhR module contains libraries that have been requested by Hutch users. The Fred Hutch module inherits the modules from the base R module that is maintained by the EasyBuild community. Hutch users should use the fh versions of R.

Requesting Modules

Adding every user request for libraries is becoming a challenge to support. The Fred Hutch R module has close to 1,000 libraries. Users are encouraged to install custom R libraries in their home directories. Users can submit install request for libraries that require system libraries.

Installing Personal R Libraries

The fhR module has over 1,000 libraries, but it might not have the one library that you need. R libraries can be installed into your UNIX home directory if they not otherwise available. Use the install.packages() function to install R libraries.

R Library Location

At startup, the R library search path is initialized from the environment variables R_LIBS, R_LIBS_USER and R_LIBS_SITE. Note: if you use an ~/.Rprofile or ~/.Renviron file, it should NEVER be setting any of the library paths. Verify your library paths after starting R. > .Library is the location of the default R library, a subdirectory of R_HOME. > .Library.site is the path to local site libraries. fhR modules use .> Library.site beginning with fhR/4.0.5. The paths for .Library and .Library.site are systems paths are not writable.

> .Library
[1] "/app/software/R/4.1.1-foss-2020b/lib64/R/library"
> .Library.site
[1] "/app/software/fhR/4.1.1-foss-2020b"

R_LIBS_USER

To install R libraries a library path to your local UNIX directory is required. Users cannot add libraries to the system library paths. By default R_LIBS_USER is unset, and if R_LIBS_USER is unset or empty, R will set it to directory ~/R/R.version$platform-library/x.y. Do not set the R_LIBS_USER environment variable. R libraries change over time, and libraries are now installed into library paths based on the Major and Minor version of R. Do not keep all your libraries in a single location. Personal libraries need to be re-installed as R is updated.

> .Library.user
Error: object '.Library.user' not found
> Sys.getenv("R_LIBS_USER")
[1] "~/R/x86_64-pc-linux-gnu-library/4.1"
>

Notice that .Library.user was blank, but Sys.getenv("R_LIBS_USER") was defined. I had to exit R and create a local library path in my home directory before the USER path was set in .libPaths.

mkdir -p ~/R/x86_64-pc-linux-gnu-library/4.1
ls ~/R/x86_64-pc-linux-gnu-library/
3.6  4.0  4.1

R
> .libPaths()
[1] "/home/jfdey/R/x86_64-pc-linux-gnu-library/4.1"
[2] "/app/software/fhR/4.1.1-foss-2020b"
[3] "/app/software/R/4.1.1-foss-2020b/lib/R/library"
>

Once you have verified that your personal library bath is based on the R version you are using and that your USER path is the first path listed from .libPaths() you can install packaages with the install.packages() command.

> install.packages("flextable")
Installing package into /home/jfdey/R/x86_64-pc-linux-gnu-library/4.1
(as lib is unspecified)
...

Issues with R Libraries

One of the most frequent R issues are errors with loading libraries. There are two major issues; the library is out of date or there is a newer version available from the system that is not being loaded. Make sure .libPaths() is correct. Do not set R_LIBS or R_LIBS_USER in any of your startup scripts. Use the new style R_LIBS_USER path based on the R major and minor version numbers. You should have a directories with with this template: ~/R/R.version$platform-library/x.y in your UNIX home directory. Your local R path takes precedence even if the libraries are older than the libraries in the system path.

fhR-4.1.2-foss-2020b

The fhR module contains libraries that have been requested by Hutch users. The Fred Hutch module inherits the modules from the base R module that is maintain...

fhR-4.0.4-foss-2020b

Known Issues smfishHmrf requires misc3d which requires X11 and DISPLAY to be set PKI package removed sigaR and HCsnip have been depreicated by Biocond...

fhR-4.0.2-foss-2019b

Fred Hutch R R with addition libraries from user requests. This release has a new name, placing ‘fh’ as a prefix. Two modules are created for each R version....

R-3.6.0-foss-2016b-fh1

Known Issues None Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2-1.14.1 Analysis Of Differential Abundance Taking Sample Variation...

R-3.5.3-foss-2016b-fh1

Known Issues None Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2-1.14.1 Analysis Of Differential Abundance Taking Sample Variation...

R-3.5.2-foss-2016b-fh1

Known Issues None Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2-1.14.1 Analysis Of Differential Abundance Taking Sample Variation...

R-3.5.1-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2-1.12.0 Analysis Of Differential Abundance Taking Sample Variation Into Account ASCAT 2.4.3...

R-3.5.0-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2 1.12.0 ASCAT 2.4.3 AUC-0.3.0 Threshold independent performance measures for probabilisti...

R-3.4.3-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2 1.10.0 ASCAT 2.4.3 AUC-0.3.0 Threshold independent performance measures for probabilisti...

R-3.4.3-GCC-5.4.0-2.26

Package List BH-1.65.0-1 Boost C++ Header Files Biobase 2.38.0 BiocGenerics 0.24.0 Biostrings 2.46.0 DBI-0.7 R Database Interface DNAcopy 1.52.0...

R-3.4.3-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test ASCAT 2.4.3 AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>c...

R-3.4.2-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.4.2-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test ALDEx2 1.10.0 AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>...

R-3.3.2-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.3.2-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.3.1-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.3.1-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.4.1-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.4.0-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.3.3-foss-2016b-fh1

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...

R-3.3.3-foss-2016b-fh2

Package List ADGofTest-0.3 Anderson-Darling GoF test AUC-0.3.0 Threshold independent performance measures for probabilistic<U+000a>classifiers. ...