It downloads the package to a temporary file, and returns the name of the file.
Name of the package to install.
Version of the package to install. Can either be a string giving the exact version required, or a specification in the same format as the parenthesized expressions used in package dependencies. One of the following formats:
An exact version required, as a string, e.g.
A comparison operator and a version, e.g.
Several criteria to satisfy, as a comma-separated string, e.g.
">= 1.12.0, < 1.14"
Several criteria to satisfy, as elements of a character vector, e.g.
c(">= 1.12.0", "< 1.14")
character vector, the base URL(s) of the repositories
to use, e.g., the URL of a CRAN mirror such as
"https://cloud.r-project.org". For more details on
supported URL schemes see
NULL to install from local files, directories or URLs:
this will be inferred by extension from
pkgs if of length one.
character, indicating the type of package to download and
install. Will be
"source" except on Windows and some macOS
builds: see the section on ‘Binary packages’ for those.
Other arguments passed on to
Name of the downloaded file.