[Rd] Buglet/omission in nls package (PR#6901)

Berwin A Turlach berwin at maths.uwa.edu.au
Sat May 22 13:17:02 CEST 2004


G'day Brian,

>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

    BDR> No one has said the coef() will work on a summary object,
But no one said that coef() will not work on a summary object either. :)

    BDR> but it would be nice if it did where appropriate.
Agreed, I looked up the help page and I think it is a bit ambiguous
about this point.  It starts off with:

   Description:
   
        'coef' is a generic function which extracts model coefficients
        from objects returned by modeling functions.  [...]

O.k., summary functions are not modeling functions, so one can argue
that one cannot expect coef() to work on summary objects.  But then
the help page continues and says:

   Arguments:
   
     object: an object for which the extraction of model coefficients is
             meaningful.

And I would argue that the extraction of model coefficients is indeed
meaningful for objects of class "summary.lm", "summary.nls",
"summary.glm" and probably a few others too. :)
OTOH, extracting model coefficient from an object of class
"summary.aov" is probably not meaningful....

    BDR> I've added an summary.nls method for 2.0.0.
Thanks!

Cheers,

        Berwin



More information about the R-devel mailing list