Skip to contents

TRUE for a race value that is present but matches none of the known categories (is_white, is_black, is_asian, is_american_native, is_pacific_islander, is_other). "unknown" and NA are treated as missing (not unspecified) and return FALSE. When unspecified values are found a warning is emitted naming the distinct offenders.

Usage

is_unspecified(x, known = character(0))

Arguments

x

input character representing race

known

optional character vector of additional recognized values to treat as specified (used by racen() to honor scicalc.racen_config).

Value

boolean representing an unrecognized race value

Examples

is_unspecified("ROMAN LATIN")
#> Warning: Unspecified race value(s) detected: "ROMAN LATIN"
#> [1] TRUE

is_unspecified("WHITE")
#> [1] FALSE

is_unspecified("UNKNOWN")
#> [1] FALSE