This article explains why you would use RStudio Package Manager in addition to Nexus Repository Manager and provides the necessary integration steps.
Why use RStudio Package Manager and Nexus?
Nexus is a general purpose manager that supports multiple languages. If you already have Nexus, or your IT organization has standardized on Nexus, there are benefits to combining it with RStudio Package Manager.
Do I need Nexus if I only have RStudio Package Manager?
No, RStudio Package Manager is a complete solution for data science teams using R.
Why should I consider RStudio Package Manager if I already have Nexus?
Nexus provides basic support for R packages, but unfortunately most data science teams face additional challenges:
Version Management - While Nexus provides access to CRAN packages, most data scientists are familiar with the challenges that come with managing package versions over time. RStudio Package Manager makes this process easier by versioning the CRAN repository in addition to versioning individual packages, making it possible for old code to "just work".
Approved Subsets of CRAN - Nexus proxies all of CRAN, but often organizations require restricted access to approved subsets of CRAN. RStudio Package Manager uses knowledge of package dependencies to help organizations maintain these validated subsets.
Linux Binaries - Nexus proxies directly from CRAN, which means its support on Linux systems is limited to source packages that can take hours to compile and install. RStudio Package Manager provides access to pre-compiled package binaries that make package installation fast enough to prevent disruptions and make it drastically easier to implement automation.
Luckily, teams do not have to pick between IT supported Nexus and the benefits of RStudio Package Manager - the two tools can be combined together.
This integration is especially helpful for organizations that wish to have RStudio Package Manager offline and are able to use Nexus as a proxy to online package sources.
How to use RStudio Package Manager with Nexus
The goal of these steps is to enable RStudio Package Manager to pull CRAN packages and metadata from Nexus.
- Inside of Nexus, create a proxying raw repository. For the Name, enter "rspm-cran". For the remote storage URL, enter:
The remainder of the default settings are appropriate.
- Copy the URL of the new repository on the repository browse page in Nexus.
- ssh into the server where RStudio Package Manager is installed. Make sure that RStudio Package Manager is stopped:
$ sudo systemctl stop rstudio-pm
- Edit the RStudio Package Manager configuration file to add the following configuration section:
ManifestURL = "<copied-repository-url>"
- Restart RStudio Package Manager:
$ sudo systemctl start rstudio-pm
- Follow the Getting Started steps in RStudio Package Manager to sync Package Manager and create a repository that subscribes to CRAN.
To verify the integration is complete, you should see the following signs of success.
In RStudio Package Manager, you should see a repository with an Activity Log showing the addition of CRAN packages.
- The integration is complete! Follow the instructions in RStudio Package Manager for configuring access to R packages. R users will access packages from RStudio Package Manager instead of accessing them directly from Nexus.