Get the Version Number for a Package

DESCRIPTION:

Gets the version number from the Version line in a package's DESCRIPTION file and returns it as a single character string.

USAGE:

getPackageVersion(pkg)

REQUIRED ARGUMENTS:

pkg
a single character string containing the name of a package.

VALUE:

a single character string containing the version number for the specified package.

DETAILS:

This function extracts the version number from the Version line of a package's DESCRIPTION file. The function first checks if pkg is attached. If so, the DESCRIPTION file for that package is read. If pkg is not attached, the usual package search mechanism is used to find the package and its DESCRIPTION file.

SEE ALSO:

EXAMPLES:

getPackageVersion("main")  # this is the same as the S+ version
getPackageVersion("pkgutils")