Thousand separators in R Studio console outputs

Is there a way to show thousand separators (ie, the commas) in the console output of R Studio by default? Without those, I find it hard to read large number outputs.

Along the same vein - is there a setting to limit the decimal places of number outputs in the console, to say 2 or 3 decimal places?

Thanks for any help. I couldn't find anything relevant on Google.

I don't know of a setting to do this in the console in either RStudio or vanilla R.

There are a variety of functions to render numeric objects as strings

pi
#> [1] 3.141593
big <- pi * 1e7
prettyNum(big,big.mark = ",")
#> [1] "31,415,927"
pi
#> [1] 3.141593
round(pi,2)
#> [1] 3.14
options(digits = 3)
pi
#> [1] 3.14

Created on 2020-08-04 by the reprex package (v0.3.0)

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