Rev 51954 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/utils/man/packageStatus.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2010 R Core Development Team% Distributed under GPL 2 or later\name{packageStatus}\title{Package Management Tools}\alias{packageStatus}\alias{print.packageStatus}\alias{summary.packageStatus}\alias{update.packageStatus}\alias{upgrade.packageStatus}\alias{upgrade}\description{Summarize information about installed packages and packagesavailable at various repositories, and automatically upgrade outdatedpackages.}\usage{packageStatus(lib.loc = NULL, repositories = NULL, method,type = getOption("pkgType"))\method{summary}{packageStatus}(object, \dots)\method{update}{packageStatus}(object, lib.loc = levels(object$inst$LibPath),repositories = levels(object$avail$Repository), \dots)\method{upgrade}{packageStatus}(object, ask = TRUE, \dots)}\arguments{\item{lib.loc}{a character vector describing the location of \Rlibrary trees to search through, or \code{NULL}. The default valueof \code{NULL} corresponds to all libraries currently known.}\item{repositories}{a character vector of URLs describing the location of \Rpackage repositories on the Internet or on the local machine.}\item{method}{Download method, see \code{\link{download.file}}.}\item{type}{type of package distribution:see \code{\link{install.packages}}.}\item{object}{an object of class \code{"packageStatus"} as returned by\code{packageStatus}.}\item{ask}{if \code{TRUE}, the user is prompted which packages shouldbe upgraded and which not.}\item{\dots}{currently not used.}}\details{The URLs in \code{repositories} should be full paths to theappropriate contrib sections of the repositories. The default is\code{contrib.url(getOption("repos"))}.There are \code{print} and \code{summary} methods for the\code{"packageStatus"} objects: the \code{print} method gives a brieftabular summary and the \code{summary} method prints the results.The \code{update} method updates the \code{"packageStatus"} object.The \code{upgrade} method is similar to \code{\link{update.packages}}:it offers to install the current versions of those packages which are notcurrently up-to-date.}\value{An object of class \code{"packageStatus"}. This is a list with twocomponents\item{inst}{a data frame with columns as the \emph{matrix} returned by\code{\link{installed.packages}} plus \code{"Status"}, a factor withlevels \code{c("ok", "upgrade")}. Only the newest version of eachpackage is reported, in the first repository in which it appears.}\item{avail}{a data frame with columns as the \emph{matrix} returned by\code{\link{available.packages}} plus \code{"Status"}, a factor withlevels \code{c("installed", "not installed", "unavailable")}..}For the \code{summary} method the result is also of class\code{"summary.packageStatus"} with additional components\item{Libs}{a list with one element for each library}\item{Repos}{a list with one element for each repository}with the elements being lists of character vectors of package name foreach status.}\seealso{\code{\link{installed.packages}}, \code{\link{available.packages}}}\examples{\dontrun{x <- packageStatus()print(x)summary(x)upgrade(x)x <- update(x)print(x)}}\keyword{utilities}