I have a series of coordinates. I know that I can cluster these using some of the basic methods like k-means or hierarchical clustering. I can also easily find out which is the closest neighbor to each coordinate.
However, how do I split the data into clusters, so that each cluster is exactly of size n, and that each coordinate only belongs to one cluster?
How could I do this in R, for example on this data and Euclidean distances:
data(iris)
plot(iris$Sepal.Length, iris$Sepal.Width)
nis a bit unusual/artificial wish towards a cluster analysis. Different answers could follow depending on the question why you need so and how equalnis allowed to interfere with the optimization function of the procedure. But you don't say a word about that. – ttnphns Dec 30 '16 at 14:59n. After each case reassignment you might want to recompute centroids to update the list of candidates for the reassignment. – ttnphns Dec 30 '16 at 14:59