Skip to contents

This is a thin wrapper around utils::available.packages(). If the argument path is supplied, then the function attempts to read from a local repository, otherwise attempts to read from a CRAN mirror at the repos url.

Usage

pkgAvail(
  repos = getOption("repos"),
  type = "source",
  Rversion = R.version,
  quiet = FALSE,
  filters = NULL
)

Arguments

repos

URL(s) of the 'contrib' sections of the repositories, e.g. "https://cran.us.r-project.org". Passed to available.packages()

type

Possible values are (currently) "source", "mac.binary" and "win.binary": the binary types can be listed and downloaded but not installed on other platforms. Passed to download.packages().

Rversion

Version of R (only used if type is not source.) Defaults to R.version, but this can be specified as any of the following formats:

  • a character string with the two digit R version, e.g. "3.1"

  • a list with components major and minor

  • the result of getRversion()

  • the result of R.version

quiet

If TRUE, suppresses warnings

filters

passed to utils::available.packages

See also