Tools to more conveniently perform tasks associated with add-on packages. pacman conveniently wraps library and package related functions and names them in an intuitive and consistent fashion. It seeks to combine functionality from lower level functions which can speed up workflow.
The pacman package is an R package management tool that combines the functionality of base library related functions into intuitively named functions. This package is ideally added to .Rprofile to increase workflow by reducing time recalling obscurely named functions, reducing code and integrating functionality of base functions to simultaneously perform multiple actions.
Function names in the pacman package follow the format of
p_xxx where 'xxx' is the task the function performs. For instance the
p_load function allows the user to load one or more packages as a more generic substitute for the
require functions and if the package isn't available locally it will install it for you.
The user can install from CRAN via:
## Make sure your current packages are up to dateupdate.packages()## devtools is requiredlibrary(devtools)install_github("trinker/pacman")
You are welcome to:
Quick Reference Table
|pacman Function||Base Equivalent||Description|
||Load and Install Packages|
||Install Packages from CRAN|
||NONE||Load and Install GitHub Packages|
||NONE||Install Packages from GitHub|
||Install Minimum Version of Packages|
||NONE||Install a Package Temporarily|
||Unload Packages from the Search Path|
||Update Out-of-Date Packages|
Releases will be numbered with the following semantic versioning format:
And constructed with the following guidelines:
p_installand dependent functions now use BiocManager to install from Bioconductor. Thanks to Garrick Aden-Buie for this update.
p_installto result in an error:
Error in readRDS(dest) : error reading from connectionas noted by @arbelt in issue #90. This was rectified in thanks to Albert Wang's pull request (see issue #91).
p_xxx_ghfunctions pick up a
dependencies = TRUEargument to automatically install necessary dependencies in the same way
install.packagesdefaults to install dependencies (See issue #75).
Support for Bioconductor packages added compliments of Keith Hughitt. See #62
p_boot added to generate a string for the standard pacman script header
that, when added to scripts, will ensure pacman is installed before
attempting to use it. pacman will attempt to copy this string (standard
script header) to the clipboard for easy cut and paste.
p_ver_cran) added to check R/package version currently
available on CRAN.
p_ver_diff) added to determine version difference between
a local package and CRAN.
p_old added to search for outdated packages.
p_load_current_gh added as partners to
p_install_version for GitHub packages. Thanks to Steve Simpson for this:
p_functions sorts the functions alphabetically before returning them.
p_path now takes a package as an argument, allowing the user to return the
path to individual packages as well.
p_versionreturns a numeric version for
p_version("R")to allow for logical comparisons.
The first installation of pacman
Package designed to assist in package related tasks.