[R] K-means clustering with NA

Arup arup.pramanik27 at gmail.com
Thu Aug 6 09:30:28 CEST 2009


I am running a k-means clustering code in R : mydata_kmeans5 <-
kmeans(mydata, centers=5).. But the problem is that the data is having some
"NA" in it. So R is showing me a message :Error in switch(nmeth, { :
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In switch(nmeth, { : NAs introduced by coercion
2: In switch(nmeth, { : NAs introduced by coercion... my objective is to
find out the customers id who are falling in particular cluster say clst 1,
clst2 etc...If I want to get a data like that where I will have customer id
on one column and cluster number on the other..what code should I use
exactly? Thanks in advance...

Arup
 

-- 
View this message in context: http://www.nabble.com/K-means-clustering-with-NA-tp24840626p24840626.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list