[R] distance metrics

Christian Hennig chrish at stats.ucl.ac.uk
Mon Mar 12 23:55:57 CET 2007


On Mon, 12 Mar 2007, Sender wrote:

> Hello:
>
> Does anyone know if there exists a package that handles methods for [ for
> dist objects?
>
> I would like to access a dist object using matrix notation
>
> e.g.
>
> dMat = dist(x)
> dMat[i,j]

Try
dMat <- as.matrix(dist(x))

Christian



*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche



More information about the R-help mailing list