Display exact value of a variable in R

Globally solution during all the session

options(digits=16)
> x
[1] 1.00042589212565

or locally just for x:

sprintf("%.16f", x)
[1] "1.0004258921256499"

Leave a Comment