convert_units | R Documentation |
convert_units() Converts the values of a vector (colname) or a direct value (data) given its starting and end unit. conversion tables are defined in utils_helpers.R
convert_units(data, colnames = NULL, unit_from, unit_to)
data |
the dataframe containing the columns where to convert units |
colnames |
the colnames where to convert units. If multiple are provided they will all be converted the same |
unit_from |
the unit to convert from |
unit_to |
the unit to convert to. Choice between "kWh", "MWh", "GWh", "TJ" |
the same dataframe with updated units on target colnames
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.