Set the number of digits using options()

Hi everyone,

I'm trying to set the number of digits by using options(digits = 3) so that I don't need to use the round function each time but it doesn't work. Any ideas of what might be causing the issue

Thanks,

The digits option controls how many digits get printed on the console but it is meant for visualization purposes only, it doesn't actually round values, they keep full precision under the hood.

1 Like

Thanks for your reply @andresrcs
They don't even appear rounded on the console so whether I specified the number of digits or not the result is the same

what digits does it show you ?

> options(digits = 3)
> 0.1234567
[1] 0.123

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.