Re: [R] What is the time complexity of 'match()'?

2009-09-17 Thread Thomas Lumley
On Thu, 17 Sep 2009, Peng Yu wrote: Hi, Suppose 'x' is a vector of length n and 'y' is a vector of length m, I am wondering what the time complexity of 'match(x,y)' is. Is it n times m? match() hashes the second argument then does hash lookups for the first argument (the source is in src/mai

Re: [R] What is the time complexity of 'match()'?

2009-09-17 Thread Tal Galili
try running it on a grid within "system.time()" And the answer will be revealed. Tal On Thu, Sep 17, 2009 at 3:15 PM, Peng Yu wrote: > Hi, > > Suppose 'x' is a vector of length n and 'y' is a vector of length m, I > am wondering what the time complexity of 'match(x,y)' is. Is it n > times m

[R] What is the time complexity of 'match()'?

2009-09-17 Thread Peng Yu
Hi, Suppose 'x' is a vector of length n and 'y' is a vector of length m, I am wondering what the time complexity of 'match(x,y)' is. Is it n times m? Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE