make_qty_units_explicit | R Documentation |
This function is intended for data frames / tibbles only and makes the specified columns explicit with the target units in the column name.
make_qty_units_explicit(df, ..., prefix = " [", suffix = "]")
df |
the data frame in which to make the units explicit |
... |
named arguments for the columns that should be made explicit and their units, e.g. |
prefix |
the prefix for the units |
suffix |
the suffix for the units |
Other quantity functions:
check_quantities
,
metric_scaling
,
quantities
,
quantity_data
,
quantity_units
# data frame with quantities
df <- tibble(x = qty(1:5, "mg"), y = qty(1:5, "L"))
df
# show with explicit units
make_qty_units_explicit(df, x = "mg")
make_qty_units_explicit(df, x = "g", y = "mL")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.