[R] Extracting objects from a list of matrix

ZABALZA-MEZGHANI Isabelle Isabelle.ZABALZA-MEZGHANI at ifp.fr
Fri Sep 19 08:43:55 CEST 2003


Hello,

I would like to have an advise about how to extract objects from a list of
matrixs
I have fitted models (stored in an object called "model") using a matrix
response and the same formula and data. I get back, from summary.lm, as many
sumarries as I have responses.
Thus I have extract the coefficient matrix for each model with the following
command :

coefficients(summary(model))

My goal is only to get the "t values" for each model. Generally to extract a
colum from a matrix I do [,"t value"], and to apply a function to a list I
use lapply. But here, I can not manage to extract the columns, since the
"[]" function, is not really a function with arguments ...

Can someone give me a solution ? (in avoiding to make a loop around my list
components).

Thanks in advance,

Isabelle.


Isabelle Zabalza-Mezghani
IFP - Reservoir Engineering Department
Rueil-Malmaison - France




More information about the R-help mailing list