install.packages {utils} R Documentation

Install Packages from Repositories or Local Files

Description


Download and install packages from CRAN-like repositories or from local files.

This is the main function to install packages. It takes a vector of names and
a destination library, downloads the packages from the repositories and installs
them. (If the library is omitted it defaults to the first directory in
.libPaths(), with a message if there is more than one.) If lib is omitted or
is of length one and is not a (group) writable directory, in interactive use
the code offers to create a personal library tree (the first element of
Sys.getenv("RLIBSUSER")) and install there. Detection of a writable
directory is problematic on Windows: see the ‘Note’ section.

For installs from a repository an attempt Is made To install the packages In
an order that respects their dependencies. This does assume that all the
entries In Lib are On the Default library path For installs (Set by
environment variable R_LIBS).

You are advised To run update.packages before install.packages To ensure that
any already installed dependencies have their latest versions.

Usage

install.packages(packages);

Arguments

packages

The dll file name, character vector of the names of packages whose current versions should be downloaded from the repositories. [as string]

envir

[as Environment]

Details

install.packages tries to detect if you have write permission on the library directories specified, but Windows reports unreliably. If there is only one library directory (the default), R tries to find out by creating a test directory, but even this need not be the whole story: you may have permission to write in a library directory but lack permission to write binary files (such as ‘.dll’ files) there. See the ‘R for Windows FAQ’ for workarounds.

Authors

SMRUCC genomics Institute

Value

this function returns data object of type any kind.

clr value class

Examples


[Package utils version 2.33.856.6961 Index]