Dear R,

Can't I cluster a dataset into k clusters where k is exactly the number of
observations? I have version 12.2 installed. See this example

> a <- matrix(1:100, 20)
> kmeans(a, 20)
Error: number of cluster centres must lie between 1 and nrow(x)

This is a bit ad-hoc but I known R from version 2.12 allows number of
clusters to be one. So I guess allowing number of clusters to be nrow(x)
should be also possible in the future release?


Feng

-- 
Feng Li
Department of Statistics
Stockholm University
106 91 Stockholm, Sweden
http://feng.li/

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to