Self-service R package installation¶
With the Research Environment, you can create and maintain your own R package libraries. There are also many commonly used R packages pre-installed in centralised locations on the RE.
Creating your own libraries¶
We suggest creating an Rpackages
folder within your working directory, either in your personal space or shared between you and your collaborators.
To do this, follow these steps:
-
Set up a personal R package library location using bash (this step can be done using file explorer)
-
Install and load packages from CRAN, BioConductor, and GitHub in R
-
Mount library locations to .libPaths() and load packages without specifying lib.loc
Please note: it may take ~5 minutes before these packages become visible after the library paths have been mounted to .libPaths().
The following code may be run before and after the above commands to check this step has been successful:
Using pre-installed packages¶
Pre-installed R packages can be found at:
/tools/aws-workspace-apps/ce/R/4.0.2
/tools/aws-workspace-apps/ce/R/4.2.1
The best practice for using "Community" packages is to add these folder locations to .libPaths in your R session. For example
Please note: it may take ~5 minutes before these packages become visible after the library paths have been mounted to .libPaths().
The following code may be run before and after the above commands to check this step has been successful:
Request packages¶
If you encounter an error when trying to install an R package, please feel free to raise a ticket through the Service Desk portal. In your ticket, please include the following:
- Version of R being used
- Name of the package causing the error
- Command being used
- Relevant error messages or a screenshot of the observed behaviour