[R] Subsetting list of vectors with list of (boolean) vectors?

Johannes Graumann johannes_graumann at web.de
Thu Apr 12 18:12:27 CEST 2007


Dear Rologists,

I'm stuck with this. How would you do this efficiently:

> aPGI
[[1]]
[1] "864"  "5576"


> aPGItest
[[1]]
[1]  TRUE FALSE

> result <- [magic box involving subset)

> result
[[1]]
[1] "864"

Thanks for any hints,

Joh



More information about the R-help mailing list