Re: [R] Fast multiple match function

2015-04-17 Thread Keshav Dhandhania
O#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On April 7, 2015 1:50:39 PM PDT, Keshav Dhandhania > wrote: > >Hi all, > > > >Thanks for the responses. > >Herve's example is a good small size example of what I wanted. > >

Re: [R] Fast multiple match function

2015-04-07 Thread Keshav Dhandhania
8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel stats4stats graphics grDevices utils datasets > [8] methods base > > other attac

[R] Fast multiple match function

2015-04-06 Thread Keshav Dhandhania
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 an