On 2013-04-03 11:54, Adams, Jean wrote:
Peter.

For suggestion 1, what advantages are there to using coef() rather than
$coef?

Not much difference for lm models, but note that it does use the
partial matching 'feature' of the '$' extractor, since the component
name is actually 'coefficients'.

But try it for an nls model. Mynlsmodel$coefficients won't work (well,
it won't give an error but it will yield NULL).

That's why there are special extractor functions such as coef.nls,
coef.Arima, etc. For lm models, coef.default is used.

Peter Ehlers


For suggestion 2, thanks!  I'm new to the plyr package and wasn't aware
of the mutate() function.

Jean


 [...snip...]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to