This function performs the pseudo within-cluster inertia of a partition from a dissimilarity matrix.
withindiss(D, part, wt = NULL)
an object of class "dist" with the dissimilarities between the n observations.
The function as.dist
can be used to transform an object of class matrix to object of class "dist".
a vector with group membership.
vector with the weights of the observations
M. Chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints. Comput Stat (2018) 33: 1799-1822.