This function converts a renv lockfile to a description file and then
determines the system requirements via pak::pkg_sysreqs() using
the RStudio online resource. This is intended to be run on continuous
integration, so will error on MacOS and Windows
Usage
ci_sysreqs(
lockfile,
execute = TRUE,
sudo = TRUE,
exclude = c("git", "make", "pandoc"),
use_pak = FALSE
)Arguments
- lockfile
the path to a renv lockfile
- execute
if
TRUE(default), the commands frompak::pkg_sysreqs()will be executed viabase::system().- sudo
if
TRUE(default), the command runs as root- exclude
packages to exclude from installation because they already exist on the system.
- use_pak
if
TRUE, use thepakpackage to determine system requirements. Else, remotes.
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" "24.04"
#> <environment: 0x5589f1c7e328>