Is the package installed and a specific version?
Source:R/system-check-vector-isPackageVersion.R
check-vector-isPackageVersion.Rd
Is the package installed and a specific version?
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.
Examples
## TRUE ====
isPackageVersion(
x = c(
"base" = utils::packageVersion("base"),
"utils" = utils::packageVersion("utils")
),
op = "=="
)
#> [1] TRUE TRUE
## FALSE ====
isPackageVersion(
x = c(
"base" = utils::packageVersion("base"),
"utils" = utils::packageVersion("utils")
),
op = ">"
)
#> [1] FALSE FALSE