load_or_install: Load or install R packages (from CRAN or Github (Public or...

Description Usage Arguments Details Value Examples

Description

Given a list of packages (e.g. list("data.table", "claramarquardt/ehR")) install (where necessary)/load all packages from CRAN/Github as appropriate.

Usage

1
2
3
load_or_install(package_list, custom_lib_path = "",
  custom_repo = "https://cran.rstudio.com", custom_package_version = TRUE,
  quiet = FALSE, github_auth_token = NA)

Arguments

package_list

List of package names which are to be installed/loaded (list - character).

custom_lib_path

Custom library path (character) [Default: Default library path].

custom_repo

R repository from which to download packages [Default: https://cran.rstudio.com"]

custom_package_version

Whether to take into account version specifications for key packages (data.table, ggplot2) (logical - TRUE/FALSE) [Default: TRUE].

github_auth_token

Github API Authentication Token (only needed if installing Github repos from a private repository) (string) [Default: NA].

verbose

Verbosity (logical - TRUE/FALSE) [Default: TRUE].

Details

Maintained by: Clara Marquardt

Value

List of packages which were successfully installed/loaded.

Examples

1
2
3
4
5
6
## Not run: 
package <- list("data.table", "trinker/plotflow")
load_or_install(package_list=package, custom_lib_path=paste0(getwd(), "/test/"), 
 quiet=FALSE)

## End(Not run)

ClaraMarquardt/ehR documentation built on May 6, 2019, 12:02 p.m.