Learn R Programming

pkg (version 0.1.1.9000)

pkg_install: Install a package

Description

Install a package and it's dependencies.

Usage

pkg_install(pkg, lib = .libPaths()[[1L]], upgrade = FALSE,
  ask = interactive())

Arguments

pkg

Package names or remote package specifications to install.

lib

Package library to install the packages to.

upgrade

Whether to upgrade already installed packages to the latest available version.

ask

Whether to ask for confirmation.

Value

Data frame, with information about the installed package(s).

Examples

Run this code
# NOT RUN {
pkg_install("dplyr")
pkg_install("dplyr", upgrade = TRUE)

## Package from GitHub
pkg_install("r-lib/pkgconfig")
# }

Run the code above in your browser using DataLab