[R] Re: packaging a package addon

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Oct 31 12:14:20 CET 2003


On Thu, 30 Oct 2003, Ross Boylan wrote:

> Thanks to everyone for their advice.  I took easy/portable route of
> adding the necessary C files to my package.  I agree that this is
> undesirable as a long term solution.
> 
> I also added library("survival") to my .First.lib.  Is library, rather
> than require, the right choice here?  I want it to fail if survival
> doesn't load.
> 
> I'm also a little surprised there isn't a platform out there that will
> gag on finding the same symbol in two different libraries...

That's why we look up the symbols directly in a shared object (and it is
important to use the PACKAGE= argument to ensure this is the right shared
object) and why dyn.load has local=TRUE as the default.  Various of us,
and particularly Duncan Temple Lang, have worked hard to get to this
point.

> Finally, a comment on R CMD check: perhaps it could produce some more of
> the output when things fail?  I found that to diagnose the loading
> problems as I developed this, I had to attempt to load the package
> myself in R to see what the actual problem was.  There wasn't enough
> info in the R CMD check to tell what exactly the problem was.

I think there usually is, but you have to look in the log file or one of 
the example files.

But I would not be doing R CMD check until I had both installed and 
loaded the package and run a few examples.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list