[Rd] Registered S3 methods not found: Documentation bug or anomaly in function update or ... ?
Ulrike Grömping
groemping at bht-berlin.de
Tue Nov 3 21:42:54 CET 2009
Dear expeRts,
I recently asked for help on an issue with S3 methods for lm. The issue
was (in DoE.base 0.9-4)
that function update from package stats would return an error whenever
DoE.base was loaded,
complaining that lm.default was not found
(e.g.
require(DoE.base)
swiss.lm <- lm(Fertility~Education+Examination, swiss)
upd.swiss.lm <- update(swiss.lm, .~.-Examination)
).
In version 0.9-4 of DoE.base, I had followed the recommendations of
Section 1.6.2 of "Writing R
extensions", exporting the generic function lm and registering the
methods (lm.design and lm.default)
with S3method but not separately exporting them in the namespace file.
Not having received help fast, I decided to try to explicitly export the
method functions
lm.design and lm.default. This did in fact remove the
issue with not finding lm.default when using function update, and I have
uploaded this fixed version
as 0.9-5.
Is it generally advisable to also export the method functions (i.e.
should section
1.6.2 of "Writing R extensions" be revised) ? Or is there an anomaly in
function update ? Or ...?
Explanations are appreciated.
Thanks and regards, Ulrike
--
***********************************************
* Ulrike Groemping *
* BHT Berlin - University of Applied Sciences *
***********************************************
* +49 (30) 39404863 (Home Office) *
* +49 (30) 4504 5127 (BHT) *
***********************************************
* http://prof.tfh-berlin.de/groemping *
* groemping at bht-berlin.de *
More information about the R-devel
mailing list