Description Usage Arguments Value Author(s) Examples
Checks if a parameter (PARAMCD
) in a dataset is provided in the expected
unit.
1 | assert_unit(dataset, param, required_unit, get_unit_expr)
|
dataset |
A |
param |
Parameter code of the parameter to check |
required_unit |
Expected unit |
get_unit_expr |
Expression used to provide the unit of |
The function throws an error if the unit variable differs from the unit for any observation of the parameter in the input dataset
Stefan Bundfuss
1 2 3 4 5 6 | data(advs)
assert_unit(advs, param = "WEIGHT", required_unit = "kg", get_unit_expr = VSSTRESU)
## Not run:
assert_unit(advs, param = "WEIGHT", required_unit = "g", get_unit_expr = VSSTRESU)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.