You get the number of list elements with length(D), 
the dimensions of M1 with dim(M1)

see help with: 
?dim
?length

Hope this helps...


>I have created a list of "matrices" using sapply or lapply and wish to 
>extract each of the "matrices" as a matrix.  Some of them are 2x2, 3x3, etc.

>I can do this one at a time as:

>M1<-as.matrix(D[[1]])

>How can repeat this process for an unknown number of entries in the list?  In 
>other words, how shall I index M1?


>Diana

-- 

Friedrich Schuster
[EMAIL PROTECTED]
Tel.: +49 6221 737474
Tel.: +49 163 7374744

______________________________________________
R-help@stat.math.ethz.ch 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