api: Working with Packages

Description Usage Arguments

Description

available.pkgs returns a matrix of the packages available in given repositories.

download.pkgs downloads packages.

exists.pkgs tells if packages are available from repositories.

Library tries loading packages and install them if needed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
available.pkgs(...)

download.pkgs(pkgs, destdir, available = NULL, ...)

exists.pkgs(pkgs, repos = getOption("repos"), ..., value = FALSE,
  fixed = TRUE)

old.pkgs(lib.loc = NULL, repos = getOption("repos"), available = NULL,
  ..., type = getOption("pkgType"), verbose = TRUE)

## S3 method for class 'pkgs'
update(lib.loc = NULL, repos = getOption("repos"),
  instlib = NULL, ask = TRUE, available = NULL, oldPkgs = NULL, ...,
  type = getOption("pkgType"), dry.run = NULL, verbose = TRUE)

Library(package, lib.loc = NULL, ...)

Arguments

...

additional arguments to be passed to download.file.

pkgs

character vector of the names of packages whose latest available versions should be downloaded from the repositories.

destdir

directory where downloaded packages are to be stored.

available

an object as returned by available.packages listing packages available at the repositories, or NULL which makes an internal call to available.packages.

repos

character vector, the base URL(s) of the repositories to use, i.e., the URL of the CRAN master such as "https://cran.r-project.org" or its Statlib mirror, "http://lib.stat.cmu.edu/R/CRAN".

value

logical, used only when fixed=FALSE, that indicates if the name of the matched packages should be returned (instead of a TRUE/FALSE logical value.

fixed

logical that indicates if the elements of x should match exactly (TRUE) or interpreted and matched as regular expressions.

lib.loc

character vector describing the location of R library trees to search through (and update packages therein), or NULL for all known trees (see .libPaths).

type

character string, indicate which type of packages: see install.packages and ‘Details’.

verbose

verbosity level (logical or numeric)

instlib

character string giving the library directory where to install the packages.

ask

logical that specifies if the user should be asked before installling the available updates, or if these should be directly installed.

oldPkgs

if specified as non-NULL, update.packages() only considers these packages for updating. This may be a character vector of package names or a matrix as returned by old.packages.

dry.run

logical that indicates if one should only return the computed set of packages and dependencies to install. If NULL, then it is internally set to TRUE only when there is a mismatch between the requested and the OS binary package types (e.g., if type = 'win.both' on a Unix/Mac host).

package

the name of a package, given as a name or literal character string, or a character string, depending on whether character.only is FALSE (default) or TRUE).


renozao/repotools documentation built on May 27, 2019, 5:53 a.m.