[Rd] importing a function, generic conflicts

From: Ben Bolker <bolker_at_zoo.ufl.edu>
Date: Sun, 20 May 2007 19:19:26 -0400

  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) ... opinions?

  (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

R-devel_at_r-project.org mailing list
Received on Sun 20 May 2007 - 23:22:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 20 May 2007 - 23:33:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.