Dear list members,

I am stuck with navigating in a rather complicated list object. 

In general I would need a solution to access all first (or other) elements of 
the different sublists in one list:

test=list(a=list(1,2),b=list(3,4),c=list(5,6))

like:

test[[1:3]][[1]]

which should result in

c(1,3,5)


Is there any way to access lists in such a way? Using unlist would create quite 
complicated objects....

Cheers
Jannis



______________________________________________
R-help@r-project.org 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