Hi,
I have a list of n items and the ith element has m_i elements within it.
I want to do something like:
predicted.values<- lapply(all.predicted.values,'[[',max.growth[[i]])
Where max.growth[[i]] is the element I want to extract from each of the ith
predicted elements. Thus, for example, I want to extract the max.growth[[1]]
element from all.predicted.values[[1]] (which is itself a list). Then I want
to extract max.growth[[2]] element from all.predicted.values[[2]].
I realize I can do this with a for loop but then if I can do this as one line
that would be preferable.
Thanks!
Greg
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.