A Fresh Approach to Package Installation
The goal of 'pkg' is to make package installation faster and
more reliable. In particular, it performs all HTTP operations in parallel,
so metadata resolution and package downloads are fast. Metadata and package
files are cached on the local disk as well. 'pkg' has a dependency solver,
so it finds version conflicts before performing the installation. This
version of 'pkg' supports CRAN, 'BioConductor' and 'GitHub' packages as well.
Manage Package Libraries
pkg installs R packages from various sources.
Install the package from CRAN:
The second line creates pkg's own package library, to avoid interference between pkg's dependencies and the user's regular packages. Run this command any time to update pkg's package library.
pkg_install to install packages:
pkg::pkg_install("dplyr", lib = "/tmp/lib")
All dependencies will be installed as well, to the same library.
Make package installation cheaper and more reliable.
Cheaper, reliable package installation allows safer, more convenient workflows.
Fast downloads and queries (all HTTP is concurrent).
Fast installs (package installations and builds are concurrent).
Package cache (all downloaded and locally built packages are cached).
Lazy downloads, only download metadata and package files if needed.
Private library (pkg's own dependencies do not affect your "regular" packages and vice versa).
Do not load any package in the main process (except for pkg itself). Every operation runs in the sub-process, and the packages are loaded from the private library.
Dependency solver: makes sure that you end up in a consistent, working state of dependencies. Find conflicts up front, before actually installing anything.
Confirmation, warning for overwriting loaded packages.
Concurrency safe, locks library, locks caches. Lock is released when the process terminates.
Show download sizes.
GPL-3 © RStudio
Functions in pkg
|local_install_deps||Install the dependencies of a package tree|
|local_install_dev_deps||Install all dependencies of a package tree|
|proj_status||Status of packages in the project library|
|lib_status||Status of packages in a ibrary|
|pkg_cleanup||Clean up pkg caches and/or the pkg library|
|pkg_create_private_lib||Install pkg's dependencies into its private library|
|local_install||Install a package tree|
|proj_install||Install project dependencies into the project library|
|proj_create||Create a project that has a private package library|
|pkg_sitrep||pkg SITuation REPort|
|pkg_remove||Remove installed packages|
|pkg_install||Install a package|
|proj_install_dev||Install project dependencies, including dev dependencies into private project library|
|proj_remove||Remove package(s) from a project|
|pkg_status||Display installed locations of a package|
|Roxygen||list(markdown = TRUE)|
|imports||assertthat , base64enc , callr (>= 126.96.36.19902) , cli (>= 1.0.0) , cliapp (>= 0.0.0.9002) , crayon (>= 1.3.4) , curl (>= 3.2) , desc (>= 1.2.0) , filelock (>= 1.0.2) , glue (>= 1.3.0) , jsonlite , lpSolve , pkgbuild (>= 1.0.2) , pkgcache (>= 1.0.3) , prettyunits , processx (>= 3.2.1) , ps (>= 1.3.0) , R6 , rematch2 , rprojroot (>= 1.3.2) , tibble , utils|
|suggests||covr , mockery , pingr , testthat , withr|
|depends||R (>= 3.2)|
|Contributors||Jim Hester, RStudio|
Include our badge in your README