[Rd] problems extracting parts of a summary object

Ross Boylan ross at biostat.ucsf.edu
Mon Mar 22 23:03:51 CET 2010


summary(x), where x is the output of lm, produces the expectedd display,
including standard errors of the coefficients.

summary(x)$coefficients produces a vector (x is r$individual[[2]]):
> r$individual[[2]]$coefficients
tX(Intercept)    tXcigspmkr        tXpeld    tXsmkpreve            mn
-2.449188e+04 -4.143249e+00  4.707007e+04 -3.112334e+01  1.671106e-01
   mncigspmkr        mnpeld    mnsmkpreve
 3.580065e+00  2.029721e+05  4.404915e+01
> class(r$individual[[2]]$coefficients)
[1] "numeric"

rather than the expected matrix like object with a column for the se's.

When I trace through the summary method, the coefficients value is a
matrix.

I'm trying to pull out the standard errors for some rearranged output.

How can I do that?

And what's going on?  I suspect this may be a namespace issue.

Thanks.
Ross Boylan

P.S. I would appreciate a cc because of some mail problems I'm having.



More information about the R-devel mailing list