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

Seth Falcon sfalcon at fhcrc.org
Thu Apr 12 18:45:38 CEST 2007


Johannes Graumann <johannes_graumann at web.de> writes:

> 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 <- aPGI[aPGItest[[1]]]

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

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the R-help mailing list