check-vector-isPackageVersion: Is the package installed and a specific version?

check-vector-isPackageVersionR Documentation

Is the package installed and a specific version?

Description

Is the package installed and a specific version?

Usage

isPackageVersion(x, op = ">=")

Arguments

x

character. Named character vector. Name corresponds to package name, and value corresponds to minimum version.

op

character(1). Mathematical operator. Defaults to less than or equal to.

Functions

  • isPackageVersion(): Vectorized.

Note

Updated 2023-10-06.

Examples

## TRUE ====
isPackageVersion(
    x = c(
        "base" = utils::packageVersion("base"),
        "utils" = utils::packageVersion("utils")
    ),
    op = "=="
)

## FALSE ====
isPackageVersion(
    x = c(
        "base" = utils::packageVersion("base"),
        "utils" = utils::packageVersion("utils")
    ),
    op = ">"
)

acidgenomics/r-goalie documentation built on Jan. 12, 2024, 4:15 a.m.