get_package_version {fritools}R Documentation

Query Installed Package Version

Description

packageVersion converts to class package_version, which then again would need to be converted for compareVersion. So this is a modified copy of packageVersion skipping the conversion to package_version.

Usage

get_package_version(x, lib_loc = NULL)

Arguments

x

A character giving the package name.

lib_loc

See argument lib.loc in packageDescription.

Value

A character giving the package version.

See Also

Other version functions: is_r_package_installed(), is_version_sufficient()

Other package functions: is_r_package_installed(), is_version_sufficient(), load_internal_functions()

Examples

get_package_version("base")
try(get_package_version("mgcv"))
utils::compareVersion("1000.0.0", get_package_version("base"))
utils::compareVersion("1.0", get_package_version("base"))
# from ?is_version_sufficient:
is_version_sufficient(installed = get_package_version("base"),
                      required = "1.0")

[Package fritools version 4.3.0 Index]