loadinstall_libraries: Load / Install CRAN Packages

Description Usage Arguments Details Author(s) Examples

View source: R/loadinstall_libraries.R

Description

Call this function to load a vector of required packages from CRAN. It will try to load the packages, and intall them if they are missing.

Usage

1
2
3
4
5
loadinstall_libraries(
  required_packages = c(),
  myrepos = options()$repos,
  install_only = FALSE
)

Arguments

required_packages

Character vector of pacakges to load / install The default is "", in which case it doesn't try to install anything.

myrepos

Repository to use. Default is "http://cran.rstudio.com/"

install_only

Boolean to indicate if the packages are only to be installed, instead of installed an loaded.

Details

You may wish to update the default repo: "http://cran.rstudio.com/" ## ## 2014-03-31 SJR Extracted this function from 00_Initialize.R ## 2014-05-05 GWL Adding function to geneorama package ##

Author(s)

Gene Leynes

Examples

1
2
3
4
5
6
7
8
9
		## Warning: this will install these packages if you don't already have
		## them
		## Not run: 
	require(geneorama)
	loadinstall_libraries(c("ggplot2", "data.table"))
		
## End(Not run)
 require(geneorama)
lll()

geneorama/geneorama documentation built on Oct. 17, 2020, 12:35 a.m.