getSversion()
The
pkgutils
library must be installed because
the class "package_version" and its methods are defined there.
getSversion
is called by functions in the
pkgutils
library.
This function emulates R's
getRversion
function.
library(pkgutils) getSversion()$major # get the major version number
# compare version numbers if (getSversion() > '8.1.0') cat("higher\n") else cat("lower\n")