Skip to main content

r

Versions and Availability

h4

h5
Module Names for r on qb3
Machine Version Module Name
qb3 3.6.2 r/3.6.2/intel-19.0.5
qb3 4.0.3 r/4.0.3/intel-19.0.5
qb3 8.2.11 raxml/8.2.11/intel-19.0.5
qb3 8.2.11 raxml/8.2.11/intel-19.0.5-mvapich-2.3.3
qb3 1.0.13 revbayes/1.0.13/gcc-9.3.0-mvapich-2.3.3

▶ Module FAQ?

▶ Did not find the version you want to use??

About the Software

R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series analysis, classification, clustering, etc. Please consult the R project homepage for further information.

Usage

On Super Mike 2, R 3.2.0 was compiled by gcc 4.7.2. So make sure gcc 4.7.2 has been added into the user environment by softenv. If not, as the default gcc loaded is 4.4.6, following error messages when trying to use R 3.2.0 will appear:

$ R
WARNING: ignoring environment value of R_HOME
/usr/local/packages/R/3.2.0/gcc-4.7.2/lib64/R/bin/exec/R: error while loading shared libraries: libquadmath.so.0: cannot open shared object file: No such file or directory
    
and R will not run. So again please make sure gcc 4.7.2 has been loaded.

R may be run either interactively via the R console, or as a batch process reading commands from a script file.

To launch the R console, simply execute the R command. After the console is launched, users can run R commands at the prompt:

$ R

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> x <- 5
> x
[1] 5
> m <- matrix(1:6,2,3)
> m
     [,1] [,2] [,3]
[1,]    1    3    5
[2,]    2    4    6
    

Rscript, on the other hand, can be used to run a R scirpt in which a sequence of R commands has been saved. The syntax is:

	$ Rscript <options> <name of the R script>
    

For example:

	$ cat hello.R 
	print("Hello World!")
	$ Rscript hello.R 
	[1] "Hello World!"
    

▶ QSub FAQ?

Resources

Last modified: April 16 2021 13:19:28.