Re: [R] kmenas does not accept NAs (was tackle with error)

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 19 Aug 2005 - 23:39:03 EST

On Fri, 19 Aug 2005, Mostafa Ghaderi wrote:

> may you drop me some idea how can i get rid of following error message:
> Error in switch(nmeth, { : NA/NaN/Inf in foreign function call (arg 1)
> i dont know what does nmeth and ther rest of error message mean? i have
> a file which contains 460 rows and 174 columns including missing value
> as NA.

> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Please do read it carefully.

You have not told us what you are doing, nor provided a reproducible example. Using traceback() will tell you where the error message is coming from.

Some searching suggests you are using kmeans(). If you have matrix with missing values which you pass to kmeans, this is what you will get. It does not accept missing values, so you will have to decide what to do about them.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Aug 19 23:44:35 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:33:46 EST