merge VariableCode and Unit, use '<', '>' or '=' as CensorCode

simplifyColumns(x, short.codes = TRUE)

Arguments

x

data frame with columns VariableCode, UnitsAbbreviation, CensorCode

short.codes

if TRUE (default) the censor codes are renamed: "lt" -> "<"; "gt" -> ">"; "nc" -> ""

Examples

x <- data.frame(VariableCode = c("A", "B"), UnitsAbbreviation = c("mg/l", "ug/l"), CensorCode = c("lt", "nc")) simplifyColumns(x)
#> VariableCode UnitsAbbreviation CensorCode #> 1 A_mg/l mg/l < #> 2 B_ug/l ug/l