Tom La Bone
2009-Dec-04 00:32 UTC
[R] Rounding a Measurement to be Consistent with its Uncertainty
I have a measurement of 8165.666 and an uncertainty of 338.9741 (the units of both are unimportant). I can easily round the uncertainty to two significant digits with signif(338.9741,2), which gives 340. Is there a function in R that will take 8165.666 and round it to be consistent with its uncertainty, i.e., 8170? Tom -- View this message in context: http://n4.nabble.com/Rounding-a-Measurement-to-be-Consistent-with-its-Uncertainty-tp948151p948151.html Sent from the R help mailing list archive at Nabble.com.
Uwe Ligges
2009-Dec-05 18:58 UTC
[R] Rounding a Measurement to be Consistent with its Uncertainty
Tom La Bone wrote:> I have a measurement of 8165.666 and an uncertainty of 338.9741 (the units of > both are unimportant). I can easily round the uncertainty to two significant > digits with signif(338.9741,2), which gives 340. Is there a function in R > that will take 8165.666 and round it to be consistent with its uncertainty, > i.e., 8170?That's not consistent, you have 3 significant digits here, but 2 for the "uncertainty" (whatever that is) ... Uwe Ligges> > Tom