Skip to content

pak behavior can be finetuned with environment variables and options (as in base::options()).

R options affecting pak's behavior

Ncpus

Set to the desired number of worker processes for package installation. If not set, then pak will use the number of logical processors in the machine.

repos

The CRAN-like repositories to use. See base::options() for details.

pak configuration

Configuration entries (unless noted otherwise on this manual page) have a corresponding environment variable, and a corresponding option.

The environment variable is always uppercase and uses underscores as the word separator. It always has the PKG_ prefix.

The option is typically lowercase, use it uses underscores as the word separator, but it always has the pkg. prefix (notice the dot!).

Some examples:

Config entry nameEnv var nameOption name
platformsPKG_PLATFORMSpkg.platforms
cran_mirrorPKG_CRAN_MIRRORpkg.cran_mirror

pak configuration entries

doc_config()

Notes

From version 0.4.0 pak copies the PKG_* environment variables and the pkg.* options to the pak subprocess, where they are actually used, so you don't need to restart R or reaload pak after a configuration change.