z22_decode {z22} | R Documentation |
Decode and translate features and categories
Description
Replace category codes with their labels.
Usage
z22_decode(codes, feature, lang = c("english", "german"))
Arguments
codes |
A vector of character codes, possibly prefixed with
|
feature |
A grid feature that the category |
lang |
Specifies the language of the output description. Can be
either |
Value
.data
with category codes decoded to labels.
Examples
# retrieves a the translation of cat codes directly
z22_decode(1, "marital_status")
# recycles codes
z22_decode(c(1, 1, 1), "marital_status")
# undefined codes are returned as NA
z22_decode(c(1, 2, 3), feature = "sex")
# special case: cat_* strings
z22_decode("cat_2", feature = "sex")
[Package z22 version 1.0.0 Index]