I'm starting to learn about R programming. I usually don't work with very sensitive numbers. Thus I usually round the decimal places in my results to 3 with round() function. Is there any way to make this default setting. I tried options("digits" = 3) but it limits whole digit span of the results. I only want to limit decimal places.round doesn't solve my problem for this because I want to make it default format. I couldn't find answer in the other question iether. I saw only one answer on that question which suggested options(digits) but as I told, It limits the whole digit number. I want what round do without typing it for all numbers.
Asked
Active
Viewed 431 times
4
Erdem
- 45
- 8
-
1Doesn't the `round` function do this? Like `round(x,2)` for some data structure `x`? – Tony Hellmuth Apr 30 '18 at 09:52
-
Possible duplicate of [Formatting Decimal places in R](https://stackoverflow.com/questions/3443687/formatting-decimal-places-in-r) – ngm Apr 30 '18 at 13:55
-
As I edited my post, round or options fonction doesn't work for me. Does anyone have another idea? – Erdem May 03 '18 at 08:46