pacman 0.2.0: Initial CRAN Release

February 16, 2015
By

(This article was first published on TRinker's R Blog » R, and kindly contributed to R-bloggers)

We’re please to announce the first CRAN release of pacman v. 0.2.0. pacman is the combined work of Dason Kurkiewicz & Tyler Rinker.

pacman 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.

Installing pacman

install.packages("pacman")

## May need the following if binaries haven't been built yet:
install.packages("pacman", type="source")

## Or install from GitHub via devtools:
devtools::install_github("trinker/pacman")

As this is the first release we expect that there are kinks that need to be worked out. We appreciate pull requests and issue reports .


Examples

Here are some of the functionalities the pacman authors tend to use most often:

Installing and Loading

p_load is a general use tool that can install, load, and update packages. For example, many blog posts begin coding with this sort of package call:

packs <- c("XML", "devtools", "RCurl", "fakePackage", "SPSSemulate")
success <- suppressWarnings(sapply(packs, require, character.only = TRUE))
install.packages(names(success)[!success])
sapply(names(success)[!success], require, character.only = TRUE)

With pacman this call can be reduced to:

pacman::p_load(XML, devtools, RCurl, fakePackage, SPSSemulate)

Installing Temporarily

p_temp enables the user to temporarily install a package. This allows a session-only install for testing out a single package without muddying the user’s library.

p_temp(aprof)

Package Functions & Data

p_functions (aka p_funs) and p_data enables the user to see the functions or data sets available in an add-on package.

p_functions(pacman)
p_funs(pacman, all=TRUE)
p_data(lattice)

Vignettes

Check out pacman’s vignettes:

To leave a comment for the author, please follow the link and comment on their blog: TRinker's R Blog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)