[ top | up ]
Distance Matrix Computation
Usage
dist(x, method = "euclidian", diag = FALSE)
print.dist(dist.obj)
Arguments
x
|
a matrix or (data frame). Distances between the rows of
x will be computed.
|
method
|
the distance measure to be used. This must be one of
"euclidian", "maximum", "manhattan",
"canberra" or "binary".
Any unambiguous substring can be given.
|
diag
|
a logical value indicating whether the diagonal of the
distance matrix should be included in the result.
|
Description
This function computes and returns the distance matrix computed by
using the specified distance measure to compute the distances between
the rows of x.
Value
The lower triangle of the distance matrix (with or without its
diagonal as specified by diag) and stored by columns in a
single vector. The vector has the attributes "size",
"diag", "labels" and class equal to "dist".
References
Mardia, K. V., J. T. Kent and J. M. Bibby (1979).
Multivariate Analysis, London: Academic Press.
See Also
hclust.
Examples
# There are no examples yet.