packageStatus

0th

Percentile

Package Management Tools

Summarize information about installed packages and packages available at various repositories, and automatically upgrade outdated packages.

Keywords
utilities
Usage
packageStatus(lib.loc = NULL, repositories = NULL, method,
              type = getOption("pkgType"))

## S3 method for class 'packageStatus': summary(object, \dots)

## S3 method for class 'packageStatus': update(object, lib.loc = levels(object$inst$LibPath), repositories = levels(object$avail$Repository), ...)

## S3 method for class 'packageStatus': upgrade(object, ask = TRUE, \dots)

Arguments
lib.loc
a character vector describing the location of Rlibrary trees to search through, or NULL. The default value of NULL corresponds to all libraries currently known.
repositories
a character vector of URLs describing the location of Rpackage repositories on the Internet or on the local machine.
method
Download method, see download.file.
type
type of package distribution: see install.packages.
object
an object of class "packageStatus" as returned by packageStatus.
ask
if TRUE, the user is prompted which packages should be upgraded and which not.
...
currently not used.
Details

The URLs in repositories should be full paths to the appropriate contrib sections of the repositories. The default is contrib.url(getOption("repos")).

There are print and summary methods for the "packageStatus" objects: the print method gives a brief tabular summary and the summary method prints the results.

The update method updates the "packageStatus" object. The upgrade method is similar to update.packages: it offers to install the current versions of those packages which are not currently up-to-date.

Value

  • An object of class "packageStatus". This is a list with two components
  • insta data frame with columns as the matrix returned by installed.packages plus "Status", a factor with levels c("ok", "upgrade", "unavailable"). Only the newest version of each package is reported, in the first repository in which it appears.
  • availa data frame with columns as the matrix returned by available.packages plus "Status", a factor with levels c("installed", "not installed").
  • For the summary method the result is also of class "summary.packageStatus" with additional components
  • Libsa list with one element for each library
  • Reposa list with one element for each repository
  • with the elements being lists of character vectors of package name for each status.

See Also

installed.packages, available.packages

Aliases
  • packageStatus
  • print.packageStatus
  • summary.packageStatus
  • update.packageStatus
  • upgrade.packageStatus
  • upgrade
Examples
library(utils) x <- packageStatus() print(x) summary(x) upgrade(x) x <- update(x) print(x)
Documentation reproduced from package utils, version 3.3, License: Part of R 3.3

Community examples

Looks like there are no examples yet.