[R] how to get column/row info from a dist object?

Pedro Mardones mardones.p at gmail.com
Fri May 11 23:18:52 CEST 2007


Dear R users;

Is it possible to get the row and column number of a particular entry
in a dist object?

Let's say that I want to find the position of the value 1.1837 (the
last entry on the dist object below), that is [6,3]. Can I get those
values without transforming the object to a matrix?, i.e. working with
the dist object only.

            1                2               3
2  0.23935864
3  0.56655914 0.71923104
4  0.15272561 0.37926989 0.43931332
5  0.17728654 0.13355685 0.73025495
6  0.61783536 0.52055379 1.18374889

Thanks for any idea
PM



More information about the R-help mailing list