getPackageVersion(pkg)
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.
getPackageVersion("main") # this is the same as the S+ version getPackageVersion("pkgutils")