> signif(1.89,digits=2) [1] 1.9
I\'d like to have 1.8
> format(round(1.20, 2), nsmall = 2) [1] "1.20" > format(round(1, 2), nsmall = 2) [1] "1.00" > format(round(1.1234, 2), nsmall = 2) [1] "1.12"
try this variation from this article so you can have more samples.