This function creates a package loader function that can install and load packages from CRAN, Bioconductor, or GitHub, optionally displaying verbose output. This function can be useful in new R instances with little dependencies available.
The function takes the following arguments:
cran
bioc
gh
verbose
where cranand
bioctake character vectors of package names on CRAN and Bioconductor, while
ghtakes character vectors with the formatting
githubUsername/packageName.
verbose` takes in a logical for whether
to display additional informative messages in the REPL.
The function will not install packages that can already be loaded by default.
Usage
createPkgLoader(lib = .libPaths()[1])