Prof Brian Ripley wrote:
On Wed, 4 Aug 2004, Matthias Burger wrote:
I wonder whether a package with namespace & dynamic library can be installed with the version number attached, ie. with the argument --with-package-versions. Is this currently possible?
I've just successfully done this with package tree, so yes.
gannet% R CMD INSTALL --with-package-versions tree_1.0-16.tar.gz gannet% R ...
library(tree) library(tree, version="1.0-16")
both work.
The crucial piece of code in namespace loading is
# load any dynamic libraries for (lib in nsInfo$dynlibs) library.dynam(lib, package, package.lib)
which is *not* the call to library.dynam you quote. I think you have a
call to library.dynam in your .onLoad, rather than/as well as using the
useDynLib directive. .onLoad *is* run with the versioned package name as its `pkgname' argument, and we should document that.
Spot on! This indeed was my oversight, removing library.dynam(pkg, pkg, lib) from the .onLoad function resolved the problem.
Thanks for the prompt help!
Best,
Matthias
-- Matthias Burger Project Manager/ Biostatistician Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany phone:+49-30-24345-371 fax:+49-30-24345-555 http://www.epigenomics.com [EMAIL PROTECTED]
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
