[R] getting package version inside .First.lib

Adrian Baddeley adrian at maths.uwa.edu.au
Thu Jan 27 06:02:26 CET 2005


    > Is it possible, inside .First.lib, to find out the
    > version number of the package that is being loaded?

Berwin Turlach kindly informs me that installed.packages() will extract 
details of all installed packages.

So if only one version of package "spatstat" has been installed,
we can determine the version number by
      installed.packages()["spatstat", "Version"]

But: if several versions of the same package are installed,
the question remains how to determine which version is being loaded...

A




More information about the R-help mailing list