Description Usage Arguments Details Value Author(s) See Also
decode_ethnicity
formats the ETHNIC_CODES
field by evaluating a scalar or vector
of values with ethnic codes and missing values and converting them to a single
label. Missing values are converted to Not Reported
.
1 | decode_ethnicity(code)
|
code |
A scalar or vector of length n and either class character or numeric
that contain an ethnicity code, i.e. |
Output may be made categorical using function
factor
or as.factor
. This function also allows for easily
tallying counts using, e.g., function table
.
Values containing ethnicity codes other than 1
or 2
are coerced to
NA
(missing) rather than converted to Not Reported
. In these
instances, a warning message is thrown. In instances where race codes
are detected, evaluation halts and an error message is thrown.
A scalar or vector of values of length n and class character
containing a single label describing the ethnicity code. NULL
values are
converted into the character string: Not Reported
.
Jamison R. Crawford, Institutional Research Associate, Georgia State University
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.