lokheart lokheart - 1 year ago 87
R Question

Rounding numbers in R

Possible Duplicate:

how to make “pretty rounding” in R?

I have a number, say
, which I want to round it to the firsts decimal place, so that the outcome is
, which should not be
, as I also want to state that the approximation is accurate to the first decimal place.

But when I use
round(1.036315, digits=1)
, R gives me
, which is something I don't want.

Any way for making R to present the thing I want?

Answer Source

should do the trick.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download