Skip to content

3.3 RStudio Server Pro Startup and packages

In this session you:

  • Review the R startup sequence and how the admin can modify this
  • How to use RStudio Package Manager for fast package install from binaries

How R starts up#

As the R admin or system administrator for the R environment, you should understand the startup sequence of R.

  • Run startup script
  • Create environment variables in Renviron
  • Run Rprofile script

For a very good introduction, read the RViews article R for Enterprise: Understanding R’s Startup

image

Introduction to RStudio Package Manager#

You will cover RStudio Package Manager later in this course, but for now it's sufficient to know that you can use Package manager to:

  • Create and host an internal mirror of the CRAN package repository
  • Host package manager in an air-gapped environment, i.e. a server with no external internet access
  • Augment the CRAN packages with additional packages from a git source, e.g. Github, GitLab or your own private git server
  • Add private packages

In addition, RStudio Package Manager can serve binary versions of these packages, meaning your users don't have to install all packages from source.

Installing binary packages#

Now is a good time to introduce one powerful benefit of RStudio Package Manager:

  • You can serve binary versions of R packages using RStudio Package Manager
  • This has a substantial performance benefit for users, since they don't have to compile all packages from source

You can read the announcement of binary packages at the RStudio blog: Package Manager 1.1.0 - No Interruptions

Note

You don't need to install RStudio Package Manager yourself to benefit from this feature. Instead, you can use the RStudio hosted Package Manager instance for installation.
This is the main objective of the exercise for this section.

Your turn#

Next complete the exercise.

Signs of success:

  • You have configured RStudio Server to install binaries from the RStudio demo instance of Package Manager
  • You have installed some packages and observed that there is no compilation step.