Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The R module is available on Pawsey systems:

$ module load r/4.13.0

Pawsey systems also preconfigure the shell environment to provide a meaningful location for user-specific package installations (in this case, R will interpret %v as 4.13.0), as seen below. This step is automatically run for you. 

export R_LIBS_USER=/software/projects/<project-id>/<user-name>/setonix/<DATE-TAG>/r/%v

Install a package using install.packages()

...

Column
width900px


Code Block
languagebash
themeEmacs
titleTerminal 1. Set up and launch an R interactive session
$ module load r/4.13.0

$ R

R version 4.13.0 (20212023-0504-1821) -- "CampAlready PontanezenTomorrow"
Copyright (C) 20202023 The R Foundation for Statistical Computing
Platform: x86_64-pc-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.

> 


...

Column
width900px


Code Block
languagebash
themeEmacs
titleTerminal 2. Install with R install.packages()
> install.packages('Rcpp')
Installing package into ‘/software/projects/<project-id>/<user-name>/r/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.curtin.edu.au/src/contrib/Rcpp_1.0.6.tar.gz'
Content type 'application/x-gzip' length 2952876 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64Warning in install.packages("Rcpp") :
  'lib = "/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/library"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) yes
Would you like to create a personal library
‘/software/projects/<YOUR-PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/4.3’
to install packages into? (yes/No/cancel) yes
--- Please select a CRAN mirror for use in this session ---

Selection: 2
trying URL 'https://cran.csiro.au/src/contrib/Rcpp_1.0.12.tar.gz'
Content type 'application/x-gzip' length 3430494 bytes (3.3 MB)
==================================================
downloaded 3.3 MB

Failed to query server: Transport endpoint is not connected
Warning in system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 12.2.0 20220819 (HPE)’
CC -std=gnu++17 -I"/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c api.cpp -o api.o
CC -std=gnu++17 -I"/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c attributes.cpp -o attributes.o
CC -std=gnu++17 -I"/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c barrier.cpp -o barrier.o
CC -std=gnu++17 -I"/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c date.cpp -o date.o
CC -std=gnu++17 -I"/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c attributesmodule.cpp -o attributesmodule.o
g++CC -std=gnu++1117 -I"/software/pawseysetonix/sles12sp32024.05/apps/sandybridgesoftware/linux-sles15-zen3/gcc/4-12.82.50/r/-4.3.6.3/lib640-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c barrierrcpp_init.cpp -o barrierrcpp_init.o
g++CC -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c date.cpp -o date.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c module.cpp -o module.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
g++ -std=gnu++11 -shared -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/lib -lR
installing to /software/projects/<project-id>/<user-name>/r/3.6/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading17 -shared -L/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/lib -L/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/lib -Wl,-rpath,/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/lib -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/software/setonix/2024.05/software/linux-sles15-zen3/gcc-12.2.0/r-4.3.0-llieqbuwjngu7buqaftswodfq3wx65dc/rlib/R/lib -lR
installing to /software/projects/<YOUR-PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/4.3/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
code for methods in class “C++OverloadedMethods” was not checked for suspicious field assignments (recommended package ‘codetools’ not available?)
code for methods in class “RcppClass” was not checked for suspicious field assignments (recommended package ‘codetools’ not available?)
code for methods in class “RcppClass” was not checked for suspicious field assignments (recommended package ‘codetools’ not available?)
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Rcpp)

The downloaded source packages are in
	‘/tmp/Rtmp39wZilRtmpt5xEuR/downloaded_packages’
> 



If you want to install this package in a different location to /software/projects/<project<YOUR-id>/<user-name>PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/%v above, you can specify the install location by adding the lib=/install/path/for/package flag, as shown in the example below:

Column
width900px


Code Block
languagebash
themeEmacs
titleTerminal 3. Specify install location with lib= flag
> install.packages('Rcpp', lib='/software/projects/<project<YOUR-id>PROJECT>/<user-name>manual/r/4.3.6')
Installing package into ‘/software/projects/<project<YOUR-id>PROJECT>/<user-name>manual/r/34.6’3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.curtin.edu.au/src/contrib/Rcpp_1.0.6.tar.gz'
Content type 'application/x-gzip' length 2952876 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/34.63.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c date.cpp -o date.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c module.cpp -o module.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
g++ -std=gnu++11 -shared -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -lR
installing to /groupsoftware/diff_projcode/rsrchr/softwareprojects/<YOUR-PROJECT>/manual/r/4.3.6/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Rcpp)

The downloaded source packages are in
	‘/tmp/Rtmp39wZil/downloaded_packages’
> 


...

Let's load the R module:

$ module load r/4.13.0

Now let's install Rcpp from its downloaded tarball:

Column
width900px


Code Block
languagebash
themeEmacs
titleTerminal 3. Install with R CMD INSTALL
$ R CMD INSTALL Rcpp_1.0.6.tar.gz 
* installing to library ‘/software/projects/<project-id>/<user-name><YOUR-PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/34.6’3’
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c date.cpp -o date.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c module.cpp -o module.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
g++ -std=gnu++11 -shared -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -lR
installing to /group/projcode/rsrchr/softwaresoftware/projects/<YOUR-PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/4.3.6/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Rcpp)


...

Let's load the R module:


$ module load r/4.13.0


Now let's install Rcpp from its downloaded tarball and specify the install location:

Column
width900px


Code Block
languagebash
themeEmacs
titleTerminal 5. Install from tarball with install.packages()
> install.packages('Rcpp_1.0.6.tar.gz', lib='/software/projects/<project-id>/<user-name>manual/r/4.3.6')
Installing package into ‘/software/projects/<project-id>/<user-name>manual/r/34.6’3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.curtin.edu.au/src/contrib/Rcpp_1.0.6.tar.gz'
Content type 'application/x-gzip' length 2952876 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c date.cpp -o date.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c module.cpp -o module.o
g++ -std=gnu++11 -I"/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include  -fpic  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
g++ -std=gnu++11 -shared -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/4.3.6.30/lib64/R/lib -lR
installing to /groupsoftware/diff_projcode/rsrchr/softwareprojects/<project-id>/manual/r/4.3.6/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Rcpp)

The downloaded source packages are in
	‘/tmp/Rtmp39wZil/downloaded_packages’
> 


...