This wrapper runs stats::kmeans()
and adds a check that centers
is
specified. And reorders the clusters.
Arguments
- centers
either the number of clusters, say \(k\), or a set of initial (distinct) cluster centres. If a number, a random set of (distinct) rows in
x
is chosen as the initial centres.- ...
Other arguments passed to
stats::kmeans()
Value
Result from stats::kmeans()