hrbrmstr / ggalt

:earth_americas: Extra Coordinate Systems, Geoms, Statistical Transformations & Scales for 'ggplot2'
https://cran.r-project.org/web/packages/ggalt/vignettes/ggalt_examples.html
Other
654 stars 99 forks source link

Add accuracy parameter to comma function to fix rounding. #55

Open hcraT opened 5 years ago

hcraT commented 5 years ago

I think that the function comma has been changed and now by default number get rounded to the nearest integer. The pull request adds the parameter to restore the original behavior that was to print one decimal digit. Without PR:

> byte_format()(1.5 * 1024^3)
[1]  "2 Gb"

with PR

> byte_format()(1.5 * 1024^3)
[1]  "1.5 Gb"