[R] Pl. provide and Input for Kmeans

Shalabh Gandhi shalabhgandhi at usa.net
Thu Sep 14 08:58:52 CEST 2000


Sir,

Would like to know what sort of input matrix are taken by the kmeans function
defined in mva library of R application. As per the documentation for the
Kmeans it takes the following 2 data sets:

1) data
2) centers

The commands to be executed in R are as follows:
library(mva)
data <- read.table('file1',header=TRUE,sep="\t")
centers <- read.table('file2',header=TRUE,sep="\t")
sink("output")
kmeans(data,centers,maxiters)
 

Can you please help me in providing with the data and center values. The data
I am currrently using gives me an error -- empty cluster: try better set of
initial centers. Number of clusters centers mush lie between 1 and nrow(n).

Waiting for your reply

regards
shalabh



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list