Message-ID: <CAO3abBpqzoi+6M+e+NBhPHd_wy6tRnLCB_yb79CvzRiMZYHYmQ@mail.gmail.com>
Date: 2015-04-06T20:56:30Z
From: Keshav Dhandhania
Subject: Fast multiple match function
Hi,
I know that one can find all occurrences of x in a vector v by doing
> which(x == v).
However, if I need to do this again and again, where v is remaining the
same, then this is quite inefficient. In my particular case, I need to do
this millions of times, and length(v) = 100 million.
Does anyone have suggestion on how to go about it?
I know of a package called fmatch that does the above for the match
function. But they don't handle multiple matches.
Thanks
[[alternative HTML version deleted]]