RStudio Package Manager includes the ability for admins to specify curated subsets of CRAN that should be available to users. Once a subset is created, admins have the option to add additional packages or update the set of packages. Each of these actions begins with a dry run that shows the admin exactly what changes will occur.
As an example, a curated CRAN repo exists at http://demo.rstudiopm.com/client/#/repos/7/packages. The repo currently contains the tidyverse packages. To add the plumber package, an admin would run:
rspm add --source=curated-src --packages=plumber --dryrun
This command would result in the dryrun output:
This action will install the following packages:
Name Version Path License Needs Compilation Dependency Installed
BH 1.66.0-1 BSL-1.0 true true
crayon 1.3.4 MIT + file LICENSE true true
httpuv 1.4.4.2 GPL (>= 2) | file LICENSE true false
jsonlite 1.5 MIT + file LICENSE true true
later 0.7.3 GPL (>= 2) true false
magrittr 1.5 MIT + file LICENSE true true
plumber 0.4.6 MIT + file LICENSE false false
promises 1.0.1 MIT + file LICENSE true false
R6 2.2.2 MIT + file LICENSE true true
Rcpp 0.12.17 GPL (>= 2) true true
rlang 0.2.1 GPL-3 true true
stringi 1.2.3 file LICENSE true true
To complete this installation, execute this command without the --dryrun flag. You will need to include the --transaction-id=656 flag. A newer version of CRAN is available, consider using update to update the entire set of packages.
This output can be saved to a csv file and reviewed by external teams. Once the changes are approved, the admin can apply them.
When the first packages are added, the source is pinned to that point in CRAN’s history. Future requests, e.g. to add plumber
, use the same moment in time.
To update the packages, an admin can use the update command:
rspm update --source=curated-src --dryrun
Resulting in a dry run output showing the necessary updates:
This action will install or archive the following packages:
Name Version Path License Needs Compilation Dependency Action
fansi 0.2.3 GPL (>= 2) true install
foreign 0.8-70.1 3.6.0/Recommended GPL (>= 2) true install
pillar 1.3.0 GPL-3 true install
tinytex 0.6 MIT + file LICENSE true install
xfun 0.3 MIT + file LICENSE true install
foreign 0.8-70 3.6.0/Recommended GPL (>= 2) archive
pillar 1.2.3 GPL-3 archive
tinytex 0.5 MIT + file LICENSE archive
To complete this update, execute this command without the --dryrun flag. You will need to include the --transaction-id=667 flag.
See more information at: http://docs.rstudio.com/rspm/admin