Tuesday, 15 January 2013

How do I read large numbers precisely in R and perform arithmetic on them? -



How do I read large numbers precisely in R and perform arithmetic on them? -

i reading csv file big numbers 1327707999760, r automatically converts 1.32771e+12. i've tried assign double class didn't work because it's rounded value. i've checked other posts preserving big numbers . people said "it's not in "1.67e+12 format", won't print exclusively using defaults. r reading in fine , whole number there." when tried arithmetic things on them, it's not right. example:

test[1,8] [1] 1.32681e+12 test[2,8] [1] 1.32681e+12 test[2,8]-test[1,8] [1] 0

but know different numbers!

that's not large. simply representation problem. seek this:

options(digits=22)

options('digits') defaults 7, why seeing do. twelve digits beingness read , stored, not printed default.

r

No comments:

Post a Comment