Page tree

Versions Compared

Key

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

Children Display
depth3
styleh5

...

Code Block
languagebash
install.packages("caret",lib=USER_WORKING_DIRECTORY,repos="https://cran.csiro.au",dependencies=TRUE)

The "lib" option specifies the target directory for the installation, the "repos" option defines the repository site to fetch the source code from and the "dependencies" option controls whether to build all its dependency libraries (TRUE) or not.

To set the search path to pick up the installed packages in a new session:

Code Block
languagebash
.libPaths( c( .libPaths(), USER_WORKDING_DIRECTORY) )

After that, you can check whether the customised R package location has been added

Code Block
languagebash
.libPaths()

There are several environmental modules for users to install their own R packages.

Firstly, users can install a package via the "R" module directly. However, there are very limited number of pre-built R packages available from the centralised R module and users may need to build both target R package and its dependencies.  

We recommend loading the module NCI-Rlibs/2021.09 when installing a new R package as it provides around 80 popular scientific R packages. Users may find some dependencies of the target R package are already installed. Note the module NCI-Rlibs/2021.09 will load the module R/4.0.0 internally so there is no need to load the R module separately.

The compiler tools may vary on what modules are used and where the R package is built, i.e. Gadi or OOD, as denoted in the table below.

...

 Modules

...

GADI

...

OOD (JupyterLab and VDI)

...

R/4.0.0

...

---

...

OS GCC

...

Gadi: R/4.0.0 module needs to combine with an Intel compiler to build R packages.

OOD: R/4.0.0 module uses the system GCC to build R packages.

...

R/4.0.0

intel-compiler/2019.5.281

...

Intel compiler

...

---

...

NCI-Rlibs/2021.09

...

Intel compiler

...

OS GCC

...

R/4.0.0

NCI-data-analysis/2021.09

...

Conda GCC

...

Conda GCC

...

NCI-data-analysis/2021.09

R/4.0.0

...

---

...

OS GCC

...

NCI-Rlibs/2021.09

NCI-data-analysis/2021.09

...

Conda GCC

...

Conda GCC

...

NCI-data-analysis/2021.09

NCI-Rlibs/2021.09

...

Intel compiler

...

OS GCC

...