I am looking for something partially along the line of this
Round number by rounding units in R
I want to have a function which automatically rounds a number smaller than 1 to a non-zero value e.g.
0.0043----> 0.004
0.087 ---> 0.09
but in general I do not know how many zero decimals I have in each number, so I cannot resort to a plain vanilla round(). Can anyone help me out?