title: In storage.mode(x) <- "double" : NAs introduced by coercion in kmeans
body: <p>I am trying to split my data into 5 clusters. But I am getting the following error</p>
  
  <pre><code>&gt; colSums(sapply(train1,is.na))
       train_id              name item_condition_id     category_name 
              0                 0                 0                 0 
     brand_name             price          shipping  item_description 
              0                 0                 0                 0 
  &gt; train1matrix=as.matrix(train1)
  &gt; train1vector=as.vector(train1matrix)
  &gt; k=5
  &gt; set.seed(88)
  &gt; KMC=kmeans(train1vector,centers=k,iter.max=1000)
  Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
  In addition: Warning message:
  In storage.mode(x) &lt;- "double" : NAs introduced by coercion
  </code></pre>
  
  <p>Can someone please help me?
  Thank you in advance</p>