[R] subset for list

Danardono daodao99 at student.umu.se
Fri Aug 24 10:59:16 CEST 2001


Hi all!
Suppose we have this list:
x<-list("101"=list(t=c(1,3,4),n=3),"104"=list(t=c(1,2),n=2),"110"=list(t=c(5,6,3,4),n=4))

(For example, 101, 104, 110 are ID number of subject, t and n are 
measurements belong to each subject)

We can take subset of that list by, for instance,
x$"101"

But how do we select multiple subject? Is there any subset-like function 
for a list?

Thanks,
Danar.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list