Skip to contents

Convert concentration units to kg/m3

Usage

convert_concentration_units(df, return_inputs = FALSE)

Arguments

df

data frame with "conc_.<g|mg|mg|ng>."

return_inputs

should input data frame also be returned (default: FALSE) or only newly calculated columns?

Value

tibble with "conc_.kg.m3"

Examples

df <- data.frame(
conc_As.ng.L = c(10, 50, 100),  # Nanogramm pro Liter
conc_Zn.ug.L = c(500, 1000, 2000),  # Mikrogramm pro Liter
conc_Fe.mg.L = c(0.1, 0.2, 0.3),    # Milligramm pro Liter
conc_Cu.g.L = c(0.005, 0.01, 0.02)  # Gramm pro Liter
)

convert_concentration_units(df)
#> Error in dplyr::select(., "flow_type", "id_base"): Can't select columns that don't exist.
#>  Column `flow_type` doesn't exist.