Learn R Programming

devtools (version 1.13.6)

install_cran: Attempts to install a package from CRAN.

Description

This function is vectorised on pkgs so you can install multiple packages in a single command.

Usage

install_cran(pkgs, repos = getOption("repos"), type = getOption("pkgType"),
  ..., quiet = FALSE)

Arguments

pkgs

Character vector of packages to install.

repos

A character vector giving repositories to use.

type

Type of package to update. If "both", will switch automatically to "binary" to avoid interactive prompts during package installation.

...

Additional arguments passed to install_packages.

quiet

If TRUE, suppress output.

See Also

Other package installation: install_bioc, install_bitbucket, install_github, install_git, install_svn, install_url, install_version, install, uninstall

Examples

Run this code
# NOT RUN {
install_cran("ggplot2")
install_cran(c("httpuv", "shiny")
# }

Run the code above in your browser using DataLab