Description Usage Arguments Details Value Bioconductor Remotes Syntax Package Configuration Examples
Install one or more R packages from a variety of remote sources.
1 2 3 4 5 6 7 8 9 |
packages |
A character vector of R packages to install. Required
package dependencies ( |
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
library |
The R library to be used. When |
type |
The type of package to install ("source" or "binary"). Defaults
to the value of |
rebuild |
Force packages to be rebuilt, thereby bypassing any installed versions of the package available in the cache? This can either be a boolean (indicating that all installed packages should be rebuilt), or a vector of package names indicating which packages should be rebuilt. |
prompt |
Boolean; prompt the user before taking any action? For backwards
compatibility, |
project |
The project directory. If |
install() uses the same machinery as restore() when installing packages.
In particular, this means that the local cache of package installations is
used when possible. This helps to avoid re-downloading packages that have
already been downloaded before, and re-compiling packages from source when
a binary copy of that package is already available.
Note that this interface is subject to change – the goal is to hook into separate package installation backends in the future.
A named list of package records which were installed by renv.
Packages from Bioconductor can be installed by using the bioc:: prefix.
For example,
1 |
will install the latest-available version of Biobase from Bioconductor.
renv depends on BiocManager (or, for older versions of R, BiocInstaller)
for the installation of packages from Bioconductor. If these packages are
not available, renv will attempt to automatically install them before
fulfilling the installation request.
renv supports a subset of the remotes syntax used for package installation,
as described in https://remotes.r-lib.org/articles/dependencies.html. See
the examples below for more details.
Many R packages have a configure script that needs to be run to prepare
the package for installation. Arguments and environment variables can be
passed through to those scripts in a manner similar to install.packages.
In particular, the R options configure.args and configure.vars can be
used to map package names to their appropriate configuration. For example:
1 2 3 4 |
Similarly, additional flags that should be passed to R CMD INSTALL can
be set via the install.opts R option:
1 2 3 4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# install the latest version of 'digest'
renv::install("digest")
# install an old version of 'digest' (using archives)
renv::install("digest@0.6.18")
# install 'digest' from GitHub (latest dev. version)
renv::install("eddelbuettel/digest")
# install a package from GitHub, using specific commit
renv::install("eddelbuettel/digest@df55b00bff33e945246eff2586717452e635032f")
# install a package from Bioconductor
# (note: requires the BiocManager package)
renv::install("bioc::Biobase")
# install a package, specifying path explicitly
renv::install("~/path/to/package")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.