assert_unit_col | R Documentation |
Assert that a value may either be a column name in the data (first) or a single unit value (second)
assert_unit_col(unit, data)
assert_unit_value(unit)
assert_unit(unit, data)
unit |
The column name or unit value |
data |
The data.frame that contains a column named |
unit
with an attribute of "unit_type" that is either "column" or
"value", or NULL
if is.null(unit)
assert_unit_col()
: Assert that a column name contains a character string
(that could be a unit specification)
assert_unit_value()
: Assert that a value may be a single unit
The function does not verify that it is a real unit like "ng/mL" only that it is a single character string.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.