Hi, Phil,
Yes. That's what I am looking for. Thank you so much.
Lisa
--
View this message in context:
http://r.789695.n4.nabble.com/Arrange-a-multi-level-list-to-a-one-level-list-tp3556500p3556601.html
Sent from the R help mailing list archive at Nabble.com.
__
Lisa -
Are you looking for this?
x <- list(list(matrix(sample(c(0,1), 4, replace = T), 2),
+ matrix(sample(c(2,3), 4, replace = T), 2)),
+ list(matrix(sample(c(0,1), 6, replace = T), 2), matrix(sample(c(2,3), 6,
+ replace = T), 2)))
unlist(x,recursive=FALSE)
[[1]]
[,1] [,2]
[1,]0
Dear all,
I just want to arrange a multi-level list to a one-level list. For example:
x <- list(list(matrix(sample(c(0,1), 4, replace = T), 2),
matrix(sample(c(2,3), 4, replace = T), 2)),
list(matrix(sample(c(0,1), 6, replace = T), 2), matrix(sample(c(2,3), 6,
replace = T), 2)))
> x
[[1]]
[[1]][
3 matches
Mail list logo