Skip to contents

This function converts a renv lockfile to a description file and then determines the system requirements via remotes::system_requirements() using the RStudio online resource. This is intended to be run on continuous integration, so will probably error on macos and windows

Usage

ci_sysreqs(
  lockfile,
  execute = TRUE,
  sudo = TRUE,
  exclude = c("git", "make", "pandoc")
)

Arguments

lockfile

the path to a renv lockfile

execute

if TRUE (default), the commands from remotes::system_requirements() will be executed via base::system().

sudo

if TRUE (default), the command runs as root

exclude

packages to exclude from installation because they already exist on the system.

Value

a vector of exectutible system calls to install the dependencies

Examples

lock <- system.file("renv.lock", package = "vise")

# The system requirements for a typical {knitr} installation
if (startsWith(tolower(R.version$os), "linux")) {
  print(vise::ci_sysreqs(lock, execute = FALSE))
}
#> [1] "ubuntu" "22.04" 
#> [1] "apt-get install -y libicu-dev"