packageStatus {utils} | R Documentation |
Summarize information about installed packages and packages available at various repositories, and automatically upgrade outdated packages.
packageStatus(lib.loc = NULL, repositories = NULL, method, type = getOption("pkgType"), ...) ## S3 method for class 'packageStatus' summary(object, ...) ## 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, ...)
lib.loc |
a character vector describing the location of R
library trees to search through, or |
repositories |
a character vector of URLs describing the location of R
package repositories on the Internet or on the local machine.
If specified as |
method |
Download method, see |
type |
type of package distribution:
see |
object |
an object of class |
ask |
if |
... |
for |
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.
An object of class "packageStatus"
. This is a list with two
components
inst |
a data frame with columns as the matrix returned by
|
avail |
a data frame with columns as the matrix returned by
|
For the summary
method the result is also of class
"summary.packageStatus"
with additional components
Libs |
a list with one element for each library |
Repos |
a list with one element for each repository |
with the elements being lists of character vectors of package name for each status.
installed.packages
, available.packages
## Not run: x <- packageStatus() print(x) summary(x) upgrade(x) x <- update(x) print(x) ## End(Not run)