16 Frequently Asked Questions

16.1 Setting Up RStudio Package Manager

Where should I install RStudio Package Manager? What server specifications do you recommend?

RStudio Package Manager can be installed on a physical server, cloud instance, virtual machine, or a long-living Docker container with persistent storage. RStudio Package Manager is supported on most Linux distributions, specifically listed in the installation section of the admin guide.

RStudio Package Manager requires 2 GB of RAM and 250 GB of disk storage. There are no restrictions or requirements for CPUs.

Does RStudio Package Manager require internet access?

RStudio Package Manager can be used without internet access, but most organizations will want RStudio Package Manager to have outbound internet access to RStudio’s CRAN service.

R clients using RStudio Package Manager do not need internet access, just access to RStudio Package Manager. RStudio Package Manager is designed to help organizations with restricted internet access in their R environment.

Can RStudio Package Manager be setup for High Availability?

Yes. RStudio Package Manager can be setup on 2 or more servers and placed behind a load balancer. This setup requires a PostgreSQL database and shared storage; see the admin guide for details.

Can I use RStudio Package Manager in an offline, air-gapped environment?

Yes, there are a number of options for air-gapped environments; see the instructions in the getting started guide.

What permissions are necessary to install RStudio Package Manager?

RStudio Package Manager’s default installation requires root privileges in order to configure the service daemon for RStudio Package Manager, setup log files, unpack RStudio Package Manager, and activate the license. It is possible to manually install RStudio Package Manager without root; see the associated appendix.

What permissions are needed to manage repositories in RStudio Package Manager?

Repositories and packages are managed with a command line interface located at /opt/rstudio-pm/bin/rspm. By default, users must be a member of the rstudio-pm Unix group to use the CLI. The group that determines access can be customized.

How do I configure RStudio Package Manager?

RStudio Package Manager’s primary configuration file is located at /etc/rstudio-pm/rstudio-pm.gcfg by default.

Do I need a database for RStudio Package Manager?

RStudio Package Manager uses a database to store meta-data and serve packages. Administrators do not need to interact with the database. By default, RStudio Package Manager will use an included SQLite database. Optionally, RStudio Package Manager can use an external PostgreSQL database and in a cluster RStudio Package Manager requires PostgreSQL.

16.2 Setting Up RStudio Package Manager

Can I use RStudio Package Manager to access CRAN?

Yes, see the CRAN quickstart guide. RStudio Package Manager can be configured to serve CRAN packages to servers behind your firewall. Behind the scenes, RStudio Package Manager maintains metadata on all CRAN packages, but only downloads content when necessary.

How do I use RStudio Package Manager to share local packages?

See the quickstart guide for local packages. RStudio Package Manager makes it easy to distribute internal packages and automatically handles archiving older versions of the package when new releases are added.

Can I setup multiple repositories in RStudio Package Manager?

Yes, RStudio Package Manager allows administrators to create multiple repositories with different package and source compositions. For example, you may have a repo with CRAN packages and a repo with local packages, or you may create a single repository that contains local and CRAN packages. You could create a production repo with stable releases and a development repo with the bleeding edge versions of packages. RStudio Package Manager optimizes storage to prevent needless duplication.

Where does RStudio Package Manager get packages?

RStudio Package Manager currently supports packages from CRAN and local packages. Packages from GitHub can be added by downloading the Git repo and creating a tar file. CRAN packages are managed by an RStudio service and can be downloaded eagerly or lazily on-demand.

16.3 Using RStudio Package Manager from R or RStudio

How do I tell R and RStudio to use RStudio Package Manager?

Each repository in RStudio Package Manager will contain a Setup web page with instructions for configuring R to use RStudio Package Manager. Once configured, R users can access packages using standard tools including install.packages, packrat, and devtools.

Can I configure RStudio Server to use RStudio Package Manager?

Yes, an administrator can configure RStudio Server (Pro) to use RStudio Package Manager by default, see the configuration instructions.

16.4 Controlling Access to Packages

How do I specify which packages should be available in RStudio Package Manager?

Administrators configure the available packages, sources, and repositories using an admin command line interface.

16.5 Package Updates

How do I update packages in RStudio Package Manager?

RStudio Package Manager can automatically update packages from CRAN on an admin-defined schedule. Local packages can be updated at any time by adding the tar file for the new version of the package.

RStudio Package Manager automatically archives older versions of packages during updates, ensuring older versions are available to users. Older versions are listed on the web page for each package.

16.6 Managing Change Control

Does RStudio Package Manager help users manage the versions of packages installed?

RStudio Package Manager was built to support all the common strategies organizations use to manage different versions of R packages. See 9 for more information.

Is RStudio Package Manager compatible with packrat?

Yes, RStudio Package Manager works with packrat for CRAN and local packages.

16.7 RStudio Package Manager and Docker

Can RStudio Package Manager run in Docker?

Yes, RStudio Package Manager can run in a Docker container that has persistent, mounted storage.

If I use Docker to manage package dependencies, should I use Package Manager?

Docker images can be used to create an environment for a certain project or analysis. However, the use of Docker is orthogonal to RStudio Package Manager. For example, inside a Dockerfile for an R project you will normally see a line that installs R packages, e.g.

RUN Rscript -e 'install.packages(...)'

This installation step benefits from RStudio Package Manager in the same way that non-Docker users benefit from RStudio Package Manager.