Compare Version Numbers

compare_version(v_installed, v_required)

Arguments

v_installed

vector with installed version numbers

v_required

vector with required version numbers

Value

The same as in utils::compareVersion(), just a vector.

See also

Other R-packages-related functions: get_pkgs_installation_status(), get_pkgs_installed()

Examples


compare_version("2.4", "2")
#> [1] 1

compare_version("2.3", "2.3")
#> [1] 0

compare_version("2.3", "2.3.1")
#> [1] -1