Package Management Tool

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.

Build Status DOI

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 library or require functions and if the package isn't available locally it will install it for you.


The user can install from CRAN via:


You can also download the dev version via zip ball or tar ball, decompress and run R CMD INSTALL on it, or use the devtools package to install the development version:

## Make sure your current packages are up to date
## devtools is required

Note: Windows users need Rtools and devtools to install this way.



You are welcome to:

Installing, Loading, Unloading, Updating, & Deleting Packages with pacman

Quick Reference Table

pacman Function Base Equivalent Description
p_load install.packages + library Load and Install Packages
p_install install.packages Install Packages from CRAN
p_load_gh NONE Load and Install GitHub Packages
p_install_gh NONE Install Packages from GitHub
p_install_version install.packages &
Install Minimum Version of Packages
p_temp NONE Install a Package Temporarily
p_unload detach Unload Packages from the Search Path
p_update update.packages Update Out-of-Date Packages




Releases will be numbered with the following semantic versioning format:


And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bumps the patch



  • Removed vignettes and tests because having pacman install violates CRAN policies.

CHANGES IN pacman VERSION 0.4.6 - 0.5.0


  • p_install and dependent functions now use BiocManager to install from Bioconductor. Thanks to Garrick Aden-Buie for this update.

CHANGES IN pacman VERSION 0.4.2 - 0.4.5


  • R version 3.4.0 cause p_install to result in an error: Error in readRDS(dest) : error reading from connection as noted by @arbelt in issue #90. This was rectified in thanks to Albert Wang's pull request (see issue #91).


  • p_xxx_gh functions pick up adependencies = TRUE argument to automatically install necessary dependencies in the same way install.packages defaults to install dependencies (See issue #75).

CHANGES IN pacman VERSION 0.3.1 - 0.4.1


  • 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_version_cran (p_ver_cran) added to check R/package version currently available on CRAN.

  • p_version_diff (p_ver_diff) added to determine version difference between a local package and CRAN.

  • p_old added to search for outdated packages.

  • p_install_version_gh and 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_version returns a numeric version for p_version("R") to allow for logical comparisons.

CHANGES IN pacman VERSION 0.2.0 - 0.3.0

  • The first installation of pacman

  • Package designed to assist in package related tasks.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5.1 by Tyler Rinker, 3 years ago

Report a bug at

Browse source code at

Authors: Tyler Rinker [aut, cre, ctb] , Dason Kurkiewicz [aut, ctb] , Keith Hughitt [ctb] , Albert Wang [ctb] , Garrick Aden-Buie [ctb] , Albert Wang [ctb] , Lukas Burk [ctb]

Documentation:   PDF Manual  

GPL-2 license

Imports remotes, methods, stats, utils

Suggests BiocManager, knitr, lattice, testthat, XML

Imported by ERP, MetaDBparse, TidyConsultant, crops, eclust, teachingApps.

Depended on by ggraptR.

Suggested by BINtools, RWsearch, UCSCXenaShiny, bruceR, cat2cat, detrendr, exampletestr, healthyR, ijtiff, miceFast, nandb, repana.

Enhanced by flowr.

See at CRAN