as_result | R Documentation |
Rounds x
according to digits
, FUN
and sets a tolerance for the result.
If the tolerance is not stated, consider it the maximum of 2*10^(-digits)
.
as_result(x, digits, tol = NA, FUN = round2)
tol(x)
rounded(x)
val(x)
digits(x)
as_res(x, digits, tol = NA, FUN = round2)
tolerance(x)
x |
numeric: value to round |
digits |
integer or character: Digits that should be used for rounding or |
tol |
numeric: tolerance for result |
FUN |
function: rounding function (default: |
A list with the original and a rounded value, digits used and tolerance.
x <- as_result(1/3, "prob")
tol(x)
rounded(x)
tol(x)
digits(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.