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)
NULL
. The default value
of NULL
corresponds to all libraries currently known.download.file
.install.packages
."packageStatus"
as returned by
packageStatus
.TRUE
, the user is prompted which packages should
be upgraded and which not."packageStatus"
. This is a list with two
componentsinstalled.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.available.packages
plus "Status"
, a factor with
levels c("installed", "not installed")
.summary
method the result is also of class
"summary.packageStatus"
with additional componentsrepositories
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.
installed.packages
, available.packages
x <- packageStatus()
print(x)
summary(x)
upgrade(x)
x <- update(x)
print(x)
Run the code above in your browser using DataCamp Workspace