Is there a way to globally control the number of decimal places that show up in the print output in R? By globally, I mean something I can run at the beginning of an R session which applies to everything in that session. The default for me appears to be 6 decimals but I don't need that level of detail. I would like to accomplish this using base R, without using round() or any other formatting function at the prompt.
For example, assume I would like everything to print to 4 decimal places. Therefore I want 123.123 to appear as 123.1230, 123.123123 as 123.1231, and 123 as 123.0000, etc. Digits() won't accomplish this as it limits the entire output to the number of digits I specify.
You can set it globally