[R] NAs introduced by coercion warning?

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Wed Feb 18 23:25:13 CET 2004



Jonathan Greenberg wrote:

> I'm running a decision tree on a large dataset, and I'm getting multiple
> instances of "NAs introduced by coercion" (> 50).  What does this mean?
> 
> --j
> 

My guess would be you're trying to convert from character to numeric and 
are unable to do so. As in,

 > as.numeric("A")
[1] NA
Warning message:
NAs introduced by coercion
 > as.numeric("1")
[1] 1
 >

But without more information from you it's impossible to tell.

See the posting guide at

http://www.R-project.org/posting-guide.html

Regards,
Sundar




More information about the R-help mailing list