[R] column of a list
Gabor Csardi
csardi at rmki.kfki.hu
Tue Jan 24 14:38:48 CET 2006
> lapply(a, "[[", "s")
$"2006-01-23"
[1] 7 12 12 11 4
$"2006-01-24"
[1] 3 8 8 9 12
This is what you need?
G.
On Tue, Jan 24, 2006 at 02:21:18PM +0100, Thomas Steiner wrote:
> I have a list of (same type) lists. I want to retrieve the same
> entries of all my objects in the outer list.
> eg:
> a<-list("2006-01-23"=list(r=5,s=c(7,12,12,11,4)),
> "2006-01-24"=list(r=6,s=c(3,8,8,9,12)))
> a[][["s"]]
>
> gives NULL, but I am looking for all the s-vectors in order to plot
> and compare them (e changes to f in a day).
> Thomas
>
> ______________________________________________
> R-help at 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
--
Csardi Gabor <csardi at rmki.kfki.hu> MTA RMKI, ELTE TTK
More information about the R-help
mailing list