> Thanks everyone for their help so far. I'm very appreciative of the fact that
> people have pointed out that I was heading in the wrong direction.
> I would be most grateful if someone could look over the following simple
> example for me and tell me if this is how to do it.
> I'm assuming by data matrix you mean the 'raw data' organised as a matrix
> Data (not euclidean distance) matrix
>> DF
>  V1 V2 V3 V4
> 1 78 45 34 45
> 2 97 23 67 12
> 3  9 56 12 67
> 4 19 67 23 90
> 5 34 12 78 56
>
> and then
>>  clusters.kmeans <-kmeans(DF, 2)

This should work. (But why don't you try instead of asking first?)

> if I want 2 clusters for example.
>
> Am I also right in thinking that I can say which 'centriods' I want the 
> clustering to be done?

You can specify from which centroids the kmeans iteration should start, if 
you want to.

Christian

>

*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
[EMAIL PROTECTED], www.homepages.ucl.ac.uk/~ucakche

______________________________________________
[email protected] 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