Thank you for the suggestion and it is exactly as you said only one
observation in each cluster. I know I can avoid this anyway and I am just
out of curiosity of the error.

I am writing a special algorithm to cluster some datasets with different
numbers of observations. For some particular datasets, there is only one
observation(e.g. people died of a rare disease). kmeans() thus will not work
at this situation.


Feng

2011/2/2 Rafael Björk <rafael.bj...@gmail.com>

> If you change the algorithm, the function allow you to do this:
>
> > kmeans(a, 20,algorithm="Lloyd")
>
> Maybe i'm missing something here, but why would you want to create as many
> clusters as there are observations? Won't the outcome just be one
> observation in each cluster?
>
>
>
>


-- 
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