[R] Why it is happeing?

Christofer Bogaso bogaso.christofer at gmail.com
Sat Nov 26 13:05:08 CET 2011


Dear all, I had following calculations with R:
> x = vector(length = 4)
> x[1] = 1
> x[2] = 3
> x[3] = 123456789123456
> x[4] = -9876543219876
> as.integer(x)
[1]  1  3 NA NA
Warning message:
NAs introduced by coercion

What went wrong?

Thanks and regards,



More information about the R-help mailing list