Install packages from Bioconductor, CRAN, or a Git remote
Arguments
- pkgs
character
. Package names to install. By default, strings are passed toBiocManager::install()
.Special cases:
Package tarball files and remote URLs (i.e. from CRAN or Bioconductor) are supported.
Strings matching "USER/REPO" are treated as GitHub repositories, and installed using
remotes::install_github()
.Strings ending with ".git" are treated as Git repositories, and installed using
remotes::install_git()
.
- lib
character
. Destination library directory path. Defaults to the first element of.libPaths()
.- dependencies
logical(1)
,character
, orNA
.TRUE
/FALSE
indicating whether to install uninstalled packages which these packages depend on/link to/import/suggest.Can pass a
character
vector, a subset ofc("Depends", "Imports", " LinkingTo", "Suggests", "Enhances")
.Can pass
NA
, the default forinstall.packages()
, which meansc("Depends", "Imports", "LinkingTo")
.
- type
character(1)
. Type of package to download and install:"binary"
,"source"
, or"both"
(prefer binary but fall back to source).- reinstall
logical(1)
. Force reinstallation of any existing packages.
Examples
## > testlib <- file.path(tempdir(), "testlib")
## > unlink(testlib, recursive = TRUE)
## > out <- install(
## > pkgs = "BiocGenerics",
## > dependencies = FALSE,
## > lib = file.path(tempdir(), "testlib")
## > )
## > print(out)
## > list.dirs(path = testlib, full.names = FALSE, recursive = FALSE)
## > unlink(testlib, recursive = TRUE)