[Rd] importing a function, generic conflicts

Ben Bolker bolker at zoo.ufl.edu
Mon May 21 01:19:26 CEST 2007

  so ... I need to calculate numerical Hessians in some
package code, and fdHess() in the nlme package seems
to work just fine.  However:

  (1) minor issue -- it bugs me a little bit to require
the whole package for the sake of a single function
(on the other hand, nlme is pretty widespread and useful).
Since nlme is GPL'd, I could just copy the fdHess function
(with attribution) into my package code.
Then I would be insulated from future changes (although
also would not get the benefit of any future bug fixes) ...

  (2) The other problem with requiring nlme is that
I have a generic conflict with the (S3) BIC generic defined
in nlme -- it asks for BIC(object, ...), assuming that
the number of observations can be extracted from the
object, whereas I have BIC(object, ..., nobs) for those
cases where one can't get the number of observations
 directly and must specify it explicitly instead.

  Does anyone have clever (or elegant) solutions to these two problems?

  Ben Bolker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://stat.ethz.ch/pipermail/r-devel/attachments/20070520/28d6f572/attachment.bin 

More information about the R-devel mailing list