Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)

Tags:

I have a data table ("norm") containing numeric - at least to what I can see - normalized values of the following form:

A screenshot of the table

When I am executing

k <- kmeans(norm,center=3) 

I am receving the following error:

Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1) 

Can you help me? Thank you!

like image 608
Jonathan Rhein Avatar asked Apr 07 '16 07:04

Jonathan Rhein


1 Answers

kmeans cannot handle data that has NA values.

The mean and variance are then no longer well defined, and you don't know anymore which center is closest.

like image 155
Has QUIT--Anony-Mousse Avatar answered Sep 23 '22 10:09

Has QUIT--Anony-Mousse