I have these two characters, and the "as.numeric" function does not work the same for them. Can someone help me why this is happening?
options (digits = 22)
a = "27"
as.numeric (a)
[1] 27.00000000000000000000
a = "193381411288395777"
as.numeric (a)
[1] 193381411288395776.0000
You can see that in the second case, the last digit is not "7", but "6". In principle, the function "as.numeric" reduces 1 unit from a number in the second case.
Any help is appreciated.
source share