update.packages
Compare Installed Packages with CRAN-like Repositories

Description

Downloads and installs the updated versions of installed packages from CRAN-like repositories.

Usage

update.packages(lib.loc = NULL, repos = getOption("repos"),
                contriburl = contrib.url(repos, type), method,
                instlib = NULL, ask = TRUE, available = NULL, 
                oldPkgs = NULL, ..., checkBuilt = FALSE,
                type = getOption("pkgType"))
new.packages(lib.loc = NULL, repos = getOption("repos"), contriburl = contrib.url(repos, 
    type), instPkgs = installed.packages(lib.loc = lib.loc), 
    method, available = NULL, ask = FALSE, ..., type = getOption("pkgType")) 
old.packages(lib.loc = NULL, repos = getOption("repos"), contriburl = contrib.url(repos, 
    type), instPkgs = installed.packages(lib.loc = lib.loc), 
    method, available = NULL, checkBuilt = FALSE, type = getOption("pkgType")) 

Arguments

lib.loc a character vector. Contains the path names of directories containing S libraries or packages. If this argument is non-NULL, then only the specified directories are searched for the specified package. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries.
repos a character vector. Contains the base URL of the repository to query. If it is NULL, then update.packages queries for updates from local files.
contriburl the URL(s) of the contrib sections of the repositories.
instPkgs an object that is the result of calling installed.packages.
method the method to use for downloading files. The available methods include "internal", "wget", "curl", "lynx" and "auto".
instlib a character string to indicate in which directory to install the packages.
ask a logical flag, or the character string "graphics". If TRUE (the default), requires the user to confirm before the actual download and installation. When it is "graphics", a GUI dialog appears, prompting the user to select the packages to be updated or installed. (This flag works only with a GUI version.)
available an object that is the result of calling available.packages. If NULL (the default), then available.packages is called.
oldPkgs an object that is the result of calling old.packages. Specifies which packages to update. If NULL (the default), then old.packages is called, and the returned value is used to specify which packages to update.
... additional arguments to pass to this function.
checkBuilt a logical flag. If TRUE, a package built under an earlier minor version of R is considered to be an 'old' package. The default is FALSE.
type a character vector. Indicates the type of package to download and install. The possible values are "source", "mac.binary", "mac.binary.leopard", "win.binary" and "win64.binary".

Details

Value
update.packagesreturns invisible NULL.
old.packagesreturns NULL or, if newer versions of installed packages are found, returns a matrix indicating which installed packages have newer versions available in the repositories. The row name of the matrix is the package name. The columns names are: "Package", "LibPath", "Installed", "Built", "ReposVer" and "Repository".
new.packagesreturns a vector of package names that are not installed in instPkgs.
See Also
install.packages, available.packages, download.packages, installed.packages, contrib.url, old.packages, new.packages
Examples
update.packages()
old.packages()
new.packages()
Package utils version 6.0.0-69
Package Index