[R] NAs introduced by coercion warning?

Don MacQueen macq at llnl.gov
Tue Nov 24 20:25:44 CET 2009


In my experience, it is generally due to something like this example:

>  as.numeric(c('1','b','2'))
[1]  1 NA  2
Warning message:
NAs introduced by coercion
>

There may be other operations that generate that error, I can't say 
for sure. But the above example illustrates what I look for when I 
get that particular message.

-Don

At 10:52 AM -0700 11/23/09, Omar Gonzalez Post wrote:
>I'm running cluster analysis on a data frame but when I calculate 
>the distance I get this warning "NAs introduced by coercion".  What 
>does this mean?
>
>  			  		 
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://*stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://*www.*R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062




More information about the R-help mailing list