View source: R/resolution-uncertainty-pct-function.R
resolution.uncertainty.pct | R Documentation |
This function compute the relative standard uncertainty (k=1) for instruments with a given number of digits (say, 4) that is always used to their fullest extend (i.e. a reading of 1 would actually be 1.000 and a reading of 1.1E-9 would actually be 1.100 x 1E-9).
As the function gives the relative uncertainty, it cannot handle a reading which is zero (the function returns NA)..
We compute the standard uncertainty from resolution limitations as the last digit divided by the squareroot of 12 (i.e. u = 0.29 * step). This is consistent with GUM F.2.2.1 and the assumption of a uniform probability distribution. So, with four digits, a reading starting with 1 (like 1.002 or -1.192e-88) will lead to an estimated resolution uncertainty of about 0.029%. Note that we assume that the instrument always provides the given number of digits.
See also: resolution.uncertainty.abs
#' Example of a 0.029% resolution uncertainty:
resolution.uncertainty.pct(1004,digits=4,last.digit.step=1)
resolution.uncertainty.pct(1.1e-20,digits=4,last.digit.step=1)
resolution.uncertainty.pct(1.1e20,digits=4,last.digit.step=1)
Note that the function is vectorized, such that calls like the following is possible:
resolution.uncertainty.pct(c(1.2, 1.3, 0, 0, NA, NA, 2), digits=4,last.digit.step=1)
resolution.uncertainty.pct(1004,digits=4,last.digit.step=1)
x |
raw reading (can be vectorized). |
digits |
number of digits on the instrument display. |
last.digit.step |
resolution of last digit (e.g. 1 or 5). |
min.value |
do not report an uncertainty below this value (e.g. 0.001 %). |
max.value |
do not report an uncertainty above this value (e.g. 50 %). |
numeric value (pct uncertainty). May be vectorixed.
Claus E. Andersen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.