
Install system dependencies for an R package
install_pkg_sys_deps.RdThis function uses a shared cache approach with safe concurrency controls:
Preserves shared pak cache to avoid redundant downloads/builds
Uses operation-specific mutexes to prevent cache corruption
Implements retry logic with exponential backoff for transient failures
Cleans up stale lock files automatically
Usage
install_pkg_sys_deps(
package_name,
tag,
local_clone_dir,
platform = platform,
aggressive_cleanup = FALSE,
patches = NULL,
arch = NULL
)Arguments
- package_name
(character)
Package name- tag
(character)
Tag/version. Tags starting with "R-" are filtered out.- local_clone_dir
(character)
Path to clone git repos into- platform
(character)
Platform identifier- aggressive_cleanup
(logical)
Perform additional cache cleanup before installation- patches
Optional path to a patch registry directory containing a
registry.json(and any referenced diff files). When set, matching packages are pre-built as patched binaries and served topakduring dependency installation. Defaults toNULL(no patching).- arch
(character)
Architecture