Rdocumentation
powered by
Learn R Programming
svs (version 1.0.2)
dist_wrt_centers: Compute Distances with respect to Cluster Centers
Description
A function for computing (euclidean) distances with respect to specified cluster centers.
Usage
dist_wrt_centers(x, clusters, freq = NULL, members_only = TRUE)
Arguments
x
A numeric matrix (containing coordinates).
clusters
A clustering of the row levels of
x
: either a list or the output of
kmeans
.
freq
An optional vector of frequency counts for the row levels of
x
.
members_only
Logical specifying whether the distances from the cluster centers should only be computed for the cluster members.
Value
A list with a matrix of distances for every cluster.