[R] How to extract sublist from a list?

pegasus_sudaka vhaguiar at gmail.com
Thu Aug 4 08:54:28 CEST 2011


Hi, have you considered using array, 
for example 
example<-array(1,dim=c(2,2,3))
dimnames(example)<-list(c("x1","x2"),c("y1","y2"))
then if you want to extract the component "x1","y1" from every member of the
list of matrices you have to
example["x1","y1",]
leaving blank in the last position. 
hope it helps.
Victor

--
View this message in context: http://r.789695.n4.nabble.com/How-to-extract-sublist-from-a-list-tp3717451p3717823.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list