An open API service indexing awesome lists of open source software.

https://github.com/trinker/blog_pacman

Blog for Initial Release of pacman
https://github.com/trinker/blog_pacman

Last synced: 5 months ago
JSON representation

Blog for Initial Release of pacman

Awesome Lists containing this project

README

          

We're please to anounce the first CRAN release of [pacman v. 0.2.0](http://cran.r-project.org/web/packages/pacman/index.html). pacman is the combined work of [Dason Kurkiewicz](https://github.com/Dasonk) & [Tyler Rinker](https://trinkerrstuff.wordpress.com/about/).

[pacman](https://github.com/trinker/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.

```{r setup, include=FALSE}
# set global chunk options
library(knitr); library(pacman)
opts_chunk$set(cache=FALSE, comment=NA)
opts_knit$set(upload.fun = image_uri, self.contained=TRUE)

# knitr::knit2html("README.Rmd", output ='README.md')
```

## Installing pacman

```{r eval=FALSE}
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](https://github.com/trinker/pacman/) and [issue reports ](https://github.com/trinker/pacman/issues).

## 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:

```{r eval=FALSE}
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:

```{r eval=FALSE}
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.

```{r eval=FALSE}
p_temp(aprof)
```

### Package Functions & Data

```{r, eval=FALSE}
p_functions(pacman)
p_funs(pacman, all=TRUE)
p_data(lattice)
```

## Vignettes

Check out pacman's vignettes:

- [HTML Vignette: Introduction to pacman](http://trinker.github.io/pacman/vignettes/Introduction_to_pacman.html)
- [pacman Functions: Quick Reference](http://trinker.github.io/pacman_dev/vignettes/pacman_functions_quick_reference.html)