
Check ethnicity characteristic_group values against standards
Source:R/check_harmonised.R
check_harmonised_eth_char_grp.RdValidates that any values in the characteristic_group column that relate
to ethnicity data conform to the expected standard conventions. Values
matching the ethnicity pattern ("ethnic", case-insensitive) that do not
contain one of the accepted standard phrases are flagged.
Details
Standard phrases are: "Ethnicity Major", "Ethnicity Minor", "Ethnicity Detailed", and "Minority Ethnic". Combined values are also accepted if they contain one of these (e.g. "Gender and Minority Ethnic").
If the characteristic_group column is absent the check passes immediately.
See also
Other check_harmonised:
check_harmonised_eth_char_vals(),
check_harmonised_eth_vals(),
check_harmonised_variables()
Examples
check_harmonised_eth_char_grp(example_data)
#> check result message
#> 1 harmonised_eth_char_grp PASS No characteristic_group column found.
#> guidance_url
#> 1 NA
check_harmonised_eth_char_grp(example_data, verbose = TRUE)
#> ✔ No characteristic_group column found.
#> check result message
#> 1 harmonised_eth_char_grp PASS No characteristic_group column found.
#> guidance_url
#> 1 NA