[R] Version Number of a Package
Jeff Gentry
jgentry at jimmy.harvard.edu
Thu Jul 10 22:23:47 CEST 2003
> I am documenting an analysis procedure in a DB and I would like to know the
> specific version number of each package that I use. Is there a standardized
> way of getting that information out from R, or should I parse it out from the
> source-code files? Ideally I would like a function like this:
> myVerNum <- Version(package.names);
There are a several ways to skin that cat.
A few that come to mind are using package.description():
> package.description("Biobase")["Version"]
Version
"1.3.27"
You can also use installed.packages():
> z <- installed.packages()
> z[1,"Version"]
[1] "1.2.28"
Also, in the Biobase package in Bioconductor (www.bioconductor.org),
there's a function package.version():
> package.version("Biobase")
[1] "1.3.27"
-J
More information about the R-help
mailing list