Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

valid

Validate installed package versions against correct versions.


Description

Check that installed packages are consistent (neither out-of-date nor too new) with the version of R and Bioconductor in use.

Usage

valid(
  pkgs = installed.packages(lib.loc, priority = priority),
  lib.loc = NULL,
  priority = "NA",
  type = getOption("pkgType"),
  filters = NULL,
  ...,
  checkBuilt = FALSE,
  site_repository = character()
)

## S3 method for class 'biocValid'
print(x, ...)

Arguments

pkgs

A character() vector of package names for checking, or a matrix as returned by \link{installed.packages}.

lib.loc

A character() vector of library location(s) of packages to be validated; see \link{installed.packages}().

priority

character(1) Check validity of all, "base", or "recommended" packages; see \link{installed.packages}().

type

character(1) The type of available package (e.g., binary, source) to check validity against; see \link{available.packages}().

filters

character(1) Filter available packages to check validity against; see \link{available.packages}().

...

Additional arguments, passed to BiocManager::\link{install}() when fix=TRUE.

checkBuilt

logical(1). If TRUE a package built under an earlier major.minor version of R (e.g., 3.4) is considered to be old.

site_repository

character(1). See ?install.

x

A 'biocValid' object returned by 'BiocManager::valid()'.

Details

This function compares the version of installed packages to the version of packages associated with the version of R and Bioconductor currently in use.

Packages are reported as 'out-of-date' if a more recent version
is available at the repositories specified by
`BiocManager::repositories()`.  Usually, `BiocManager::install()` is
sufficient to update packages to their most recent version.

Packages are reported as 'too new' if the installed version is
more recent than the most recent available in the
`BiocManager::repositories()`. It is possible to down-grade by
re-installing a too new package "PkgA" with
`BiocManger::install("PkgA")`. It is important for the user to
understand how their installation became too new, and to avoid
this in the future.

Value

biocValid list object with elements too_new and out_of_date containing data.frames with packages and their installed locations that are too new or out-of-date for the current version of Bioconductor. When internet access is unavailable, an empty 'biocValid' list is returned. If all packages ('pkgs') are up to date, then TRUE is returned.

'print()' is invoked for its side effect.

Author(s)

See Also

BiocManager::\link{install}() to update installed packages.

Examples

if (interactive()) {
  BiocManager::valid()
}

BiocManager

Access the Bioconductor Project Package Repository

v1.30.15
Artistic-2.0
Authors
Martin Morgan [aut] (<https://orcid.org/0000-0002-5874-8148>), Marcel Ramos [ctb, cre] (<https://orcid.org/0000-0002-3242-0582>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.