use | R Documentation |
Attaches or loads packages. If a package is not installed, it (and its dependencies) will be installed from one of the (known) repositories.
## Default S3 method:
use(pkg="R.utils", version=NULL, how=c("attach", "load"), quietly=TRUE,
warn.conflicts=!quietly, install=getOption("R.utils.use.install",
Sys.getenv("R_R_UTILS_USE_INSTALL", "TRUE")), repos=getOption("use/repos",
c("[[current]]", "[[mainstream]]")), ..., verbose=FALSE)
pkg |
A |
version |
(optional) Version constraint(s) on requested package(s). |
how |
A |
quietly |
If |
warn.conflicts |
If |
install |
If |
repos |
(optional) A |
... |
Additional named arguments passed to
|
verbose |
If |
Returns a vector
of package_version
() for each package
attached/loaded.
If one of the requested packages/package versions is not available
and could not be installed, an error is thrown.
library
() and "base::install.packages".
To modify the set of known repositories, set option repos
(see options
()),
which can also be done via setRepositories
.
## Not run:
use("digest")
use("digest (>= 0.6.3)")
use("digest (>= 0.6.3)", repos=c("CRAN", "R-Forge"))
use("(CRAN|R-Forge)::digest (>= 0.6.3)")
use("BioCsoft::ShortRead")
use("digest, R.rsp (>= 0.9.17)")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.