p_load_gh: Load One or More GitHub Packages

Description Usage Arguments See Also Examples

Description

This function is a wrapper for install_github which is the same as install_github and require. It checks to see if a package is installed, if not it attempts to install the package from GitHub.

Usage

1
2
p_load_gh(..., char, install = TRUE, update = getOption("pac_update"),
  dependencies = TRUE)

Arguments

char

Character vector containing repository address to load. If you are calling p_load_gh from within a function (or just having difficulties calling it using a character vector input) then pass your character vector of packages to load to this parameter directly.

install

logical. If TRUE will attempt to install a package not found in the library.

update

logical. If TRUE will attempt to update all out of date packages. Default allows the user to set a "pac_update" in his/her .Rprofile.

dependencies

logical. If TRUE necessary dependencies will be installed as well.

...

Repository address(es) in the format username/repo[/subdir][@ref|#pull]. Note that this must be a character string.

See Also

install_github library, require

Examples

1
2
3
4
5
6
7
8
## Not run: 
p_load_gh("Dasonk/Dmisc", "trinker/regexr")

p_load_gh(c("trinker/regexTools",
    "hadley/lubridate",
    "ramnathv/rCharts"))

## End(Not run)

Example output

Warning message:
In p_load_gh("Dasonk/Dmisc", "trinker/regexr") : 
Failed to install/load:
Dasonk/Dmisc, trinker/regexr
Warning message:
In p_load_gh(c("trinker/regexTools", "hadley/lubridate", "ramnathv/rCharts")) :
  
Failed to install/load:
trinker/regexTools, ramnathv/rCharts

pacman documentation built on May 2, 2019, 1:08 p.m.