[R] checking for identical columns in a mxn matrix

Liaw, Andy andy_liaw at merck.com
Wed Dec 3 19:54:16 CET 2003


> From: Rajarshi Guha

> On Wed, 2003-12-03 at 13:18, J.R. Lockwood wrote:
> 
> > list will come up with something clever.  the other issues 
> is that you
> > need to be careful when doing equality comparisons with 
> floating point
> > numbers.  unless your matrix consists of characters or integers,
> > you'll need to think about some level of numerical tolerance of your
> > comparison.
> 
> Yes, the matrix will always be integer.

Other than what J.R. and Marc suggested, you might could try to use

dist(t(x), method="manhattan")

and see which entries are 0 (or close enough to 0).

HTH,
Andy


 
> -------------------------------------------------------------------
> Rajarshi Guha <rxg218 at psu.edu> <http://jijo.cjb.net>
> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
> -------------------------------------------------------------------
> All theoretical chemistry is really physics; and all theoretical
> chemists 
> know it.
> -- Richard P. Feynman
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>




More information about the R-help mailing list