Part of Using RStudio in the NHS England Secure Data Environment
RStudio Package Manager
The SDE Package Manager allows you to install pre-approved packages through CRAN and Pypi Mirrors for use with RStudio.
Installing Packages for use in RStudio Desktop
The package mirror repository URL will allow you to install packages from the Package Manager for use in RStudio Desktop.
To install a package, run the following script.
install.packages("package name", repos =
"https://packages.sde.digital.nhs.uk/repository/cran-mirror/", dependencies = TRUE)
To set a mirror in RStudio:
1. Go to Tools, then Global Options... and select Packages.
2. Update the Primary CRAN repository to the mirror address. For example: https://packages.sde.digital.nhs.uk/repository/cran-mirror/
Installing Packages for use in RStudio Server
To install a package from the Package Manager for use within RStudio Server, run the following script.
install.packages("package name", repos =
"https://packages.sde.digital.nhs.uk/repository/cran-mirror/", dependencies = TRUE)
When you run this script, packages will be installed only for you, not your cluster. Packages will persist between RStudio Server sessions but will not persist when the RStudio Server cluster is restarted.
Request a new package
If you would like to request a new package that is not currently available through the Package Manager, email the National Service Desk at [email protected].
You must include the name of the package and a link to the package mirror in your request. This cannot be a Github link.
Last edited: 12 February 2025 1:42 pm