[R] Vector comparison to matrix

From: Todd Remund <tkremund98_at_hotmail.com>
Date: Mon 15 Aug 2005 - 15:12:42 EST

I am looking for a fast way to count the number of rows in a matrix are identical to a pattern vector. For example, if I am interested in counting the number of row vectors in a matrix that are identical to (1,2,3) what would I do? I have tried the identical statement in a loop but this is far too slow. I have a very large matrix and need to avoid loops at all costs. Thanks for any help.
Todd Remund

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Aug 15 15:21:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:49 EST