switch_units | R Documentation |
In RHoMIS, sometimes lists or data frames contain units which need to be converted from a character format (e.g. "kg","sacks_100kg") into a numeric conversion (e.g. 1, 100). This function does just that.
switch_units(data_to_convert, unit_tibble, id_vector)
data_to_convert |
This list or data frame which needs to be converted |
unit_tibble |
A tibble containing |
id_vector |
Column containing the RHoMIS id, used to subset the units by project data frame |
Rpackage file: CleanRawData.R
Returns the data (in its original format) with the units in their numerical format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.