...
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.1
):3.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 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 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 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 2. Install with R install.packages() |
---|
| > install.packages('Rcpp')
InstallingWarning package into ‘/group/projcode/rsrchr/software/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/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/3.6.3/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/3.6.3/lib64in 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 dateapi.cpp -o dateapi.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 moduleattributes.cpp -o moduleattributes.o
g++CC -std=gnu++1117 -I"/pawseysoftware/sles12sp3setonix/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib642024.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 rcpp_initbarrier.cpp -o rcpp_initbarrier.o
g++CC -std=gnu++1117 -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.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
module.o rcpp_init.o -L/pawsey/sles12sp3/apps/sandybridge/gcc/4.8.5/r/3.6.3/lib64/R/lib -lR
installing to /group/projcode/rsrchr/software/r/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’
> |
|
Install a package using R CMD INSTALL
R also provides a Linux shell option to install packages, via the command R CMD INSTALL
. This command requires the package tarball to be already downloaded. It will not take care of any dependencies, so it is an effective method only for simple installations.
Let's load the R module:
$ module load r/4.1.0
Now let's install Rcpp from its downloaded tarball:
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 3. Install with R CMD INSTALL |
---|
| $ R CMD INSTALL Rcpp_1.0.6.tar.gz
* installing to library ‘/group/projcode/rsrchr/software/r/3.6’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 module.cpp -o module.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 rcpp_init.cpp -o rcpp_init.o
CC -std=gnu++17 -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/Rtmpt5xEuR/downloaded_packages’
> |
|
If you want to install this package in a different location to /software/projects/
<YOUR-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 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 3. Specify install location with lib= flag |
---|
| > install.packages('Rcpp', lib='/software/projects/<YOUR-PROJECT>/manual/r/4.3')
Installing package into ‘/software/projects/<YOUR-PROJECT>/manual/r/4.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.0/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.0/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.0/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.0/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.0/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.0/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.0/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.0/lib64/R/lib -lR
installing to /software/projects/<YOUR-PROJECT>/manual/r/4.3/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’
> |
|
Install a package using R CMD INSTALL
R also provides a Linux shell option to install packages, via the command R CMD INSTALL
. This command requires the package tarball to be already downloaded. It will not take care of any dependencies, so it is an effective method only for simple installations.
Let's load the R module:
$ module load r/4.3.0
Now let's install Rcpp from its downloaded tarball:
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 3. Install with R CMD INSTALL |
---|
| $ R CMD INSTALL Rcpp_1.0.6.tar.gz
* installing to library ‘/software/projects/<YOUR-PROJECT>/<USERNAME>/setonix/<DATE-TAG>/r/4.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.0/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.0/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.0/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.0/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.0/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.0/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.0/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.0/lib64/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
** 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) |
|
An alternative way to install from a tarball is to use the install.packages("Rcpp_1.0.6.tar.gz").
This assumes the tarball is in your working directory. It is also possible to additionally specify the installation location by adding the lib=/install/path/for/package
flag.
Let's load the R module:
$ module load r/4.3.0
Now let's install Rcpp from its downloaded tarball and specify the install location:
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 5. Install from tarball with install.packages() |
---|
| > install.packages('Rcpp_1.0.6.tar.gz', lib='/software/projects/<project-id>/manual/r/4.3')
Installing package into ‘/software/projects/<project-id>/manual/r/4.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/projcodeprojects/rsrchr<project-id>/softwaremanual/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’
> |
|
Related pages
- To use containers for packaging and deploying R workflows, see Containers.
- To use the Conda package manager, see Conda and Reproducible Installations.
External links
- Information on how R sets up package paths can be found in Search Paths for Packages.