Description Usage Arguments Details Value Author(s) See Also
decode_sex
formats the SEX
field by evaluating a scalar or vector of
values with gender codes and missing values. F
is converted to Female
,
M
is converted to Male
, and NULL
values are converted to Not Reported
.
1 | decode_sex(code)
|
code |
A 1-character |
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 which are not NULL
nor contain F
or M
are coerced to NA.
A scalar or vector of values converted into full-length, descriptive labels or
Not Reported
if missing.
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.