Learn R Programming

renv (version 0.3.0-40)

install: Install Packages

Description

Install one or more R packages.

Usage

install(packages, project = NULL, library = NULL)

Arguments

packages

A character vector of R packages to install. Required package dependencies (Depends, Imports, LinkingTo) will be installed as required.

project

The project directory. If NULL, then the active project will be used. If no project has been specifically activated, the current working directory is used.

library

The library from which packages should be installed. When NULL, the active library (that is, the first entry reported in .libPaths()) is used instead.

Details

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.