View source: R/prep_expand_codes.R
prep_expand_codes | R Documentation |
Code labels are copied from other variables, if the code is the same and the label is set only for some variables
prep_expand_codes(
meta_data = "item_level",
suppressWarnings = FALSE,
mix_jumps_and_missings = FALSE
)
meta_data |
data.frame the data frame that contains metadata attributes of study data |
suppressWarnings |
logical show warnings, if labels are expanded |
mix_jumps_and_missings |
logical ignore the class of the codes for label expansion, i.e., use missing code labels as jump code labels, if the values are the same. |
data.frame an updated metadata data frame.
## Not run:
load(system.file("extdata", "meta_data.RData", package = "dataquieR"))
meta_data$JUMP_LIST[meta_data$VAR_NAMES == "v00003"] <- "99980 = NOOP"
md <- prep_expand_codes(meta_data)
md$JUMP_LIST
md$MISSING_LIST
md <- prep_expand_codes(meta_data, mix_jumps_and_missings = TRUE)
md$JUMP_LIST
md$MISSING_LIST
load(system.file("extdata", "meta_data.RData", package = "dataquieR"))
meta_data$MISSING_LIST[meta_data$VAR_NAMES == "v00003"] <- "99980 = NOOP"
md <- prep_expand_codes(meta_data)
md$JUMP_LIST
md$MISSING_LIST
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.