Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201919

K-Means clustering in R error NA/NaN/Inf in foreign function call

$
0
0

I have a dataset that I have created in R. It is structured as follows: enter image description here

I am trying to cluster the observations using k-means. However, I get the following error message:

> cl <- kmeans(sample, 3)

Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
In storage.mode(x) <- "double" : NAs introduced by coercion

What does this mean? Am I prepocessing the data incorrectly? What can I do to fix it?


Viewing all articles
Browse latest Browse all 201919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>