Stats

587 Contributors: 28 Friday, July 7, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Installing packages

Syntax

  • install.packages(pkgs, lib, repos, method, destdir, dependencies, ...)

Parameters

ParameterDetails
pkgscharacter vector of the names of packages. If repos = NULL, a character vector of file paths.
libcharacter vector giving the library directories where to install the packages.
reposcharacter vector, the base URL(s) of the repositories to use, can be NULL to install from local files
methoddownload method
destdirdirectory where downloaded packages are stored
dependencieslogical indicating whether to also install uninstalled packages which these packages depend on/link to/import/suggest (and so on recursively). Not used if repos = NULL.
...Arguments to be passed to ‘download.file’ or to the functions for binary installs on OS X and Windows.

Remarks

Related Docs

Related Examples