[R] Fast way to finding index in Vector

Gundala Viswanath gundalav at gmail.com
Tue Jan 13 03:07:58 CET 2009


Dear all,

Suppose I have the following vector as repository:

> repo <- c("AAA", "AAT", "AAC", "AAG", "ATA","ATT")

Given another query vector

> qr <- c("AAC", "ATT")

is there a way I can find the query index in repository in a fast way.

Giving:

[1] 3 6

Typically the size of  repo is around ~12million element, and
query around ~1 million element.


- Gundala Viswanath
Jakarta - Indonesia




More information about the R-help mailing list