Clean whitespace from Flow and Product strings
clean_iea_whitespace.RdOccasionally, in the IEA extended energy balance data,
extra whitespace characters are found at the beginning or end of Flow and Product strings.
This function removes all leading and trailing whitespece.
Arguments
- .iea_df
A data frame containing
FlowandProductcolumns.- flow
The name of the flow column in
iea_df. Default is "Flow".- product
The name of the product columns in
iea_df. Default is "Product".
Examples
data.frame(Flow = " a flow ", Product = " a product ", stringsAsFactors = FALSE) %>%
clean_iea_whitespace()
#> Flow Product
#> 1 a flow a product