lolibility lolibility - 1 year ago 135
R Question

r scientific notation limit mantissa decimal points

In r, is it possible to limit the number after decimal points of mantissa/significand. E.g 1.43566334245e-9, I want to ignore/round to 1.44e-9.

I do not want to simply say keep N numbers after decimal. Cause if there is another number in the dataset is 5.2340972e-5, I want it to be 5.23e-5 but not 5.234097e-5. So only limiting on mantissa's decimal point, rather than the whole number.

Answer Source

If I understood you correctly:

[1] 1.44e-09

[1] 5.23e-05
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download