Skip to contents

Standardises health-related classification labels by replacing coded values with human-readable labels.

Usage

transform_health_values(
  data_chr,
  new_missing_chr = c("Not stated", "_N"),
  new_total_chr = c("Total", "_T"),
  new_var_chr = c("Mental Health Condition", "91"),
  ...
)

Arguments

data_chr

Character vector to transform.

new_missing_chr

Length-two character vector specifying the replacement label for missing values and the source code used to represent missingness.

new_total_chr

Length-two character vector specifying the replacement label for total values and the source code used to represent totals.

new_var_chr

Length-two character vector specifying the replacement label for the target condition and the source code used to represent that

...

Additional arguments passed through from calling functions.

Details

This helper function is primarily used when transforming ABS health datasets prior to contingency-table construction.