formattable
formattable copied to clipboard
percent function of 0.185 does not work correctly for digits = 0
I found that rounding value does not work correctly:
E.g.
percent(0.185, digits = 0)
gives me 18 which is not correct value in terms of rounding.
Thanks for reporting this. percent() simply accepts the internal rounding in R, which gives
> round(c(0.184, 0.185, 0.1851, 0.186), 2)
[1] 0.18 0.18 0.19 0.19