?kmeans says the following. Note that x is a matrix of ***data***. Also look at the examples at the end of the help page if its still not clear.
Usage: kmeans(x, centers, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen")) Arguments: x: A numeric matrix of data, or an object that can be coerced to such a matrix (such as a numeric vector or a data frame with all numeric columns). On 8/7/06, Ffenics <[EMAIL PROTECTED]> wrote: > Thanks. I had a look at that and it says: > > > Partitioning Clustering: > > Function kmeans() > from package stats provides several algorithms for computing > partitions with respect to Euclidean distance. > Hence why I am using a euclidean distance matrix. Why is this incorrect? > > Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > There are many clustering functions in R and R packages and some > take distance objects whereas others do not. You likely read about > hclust or some different clustering function. See ?kmeans for the > kmeans function and also look at the CRAN Task View on clustering for > other clustering functions: > > http://cran.r-project.org/src/contrib/Views/ > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > ______________________________________________ R-help@stat.math.ethz.ch 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.