Description Usage Arguments Value See Also Examples
View source: R/suggest_var_names.R
The function harmonizes the variable names of surveys (of class survey
) that
are imported from an external file as a wave.
1 2 3 4 5 6 | suggest_var_names(
metadata,
permanent_names = NULL,
survey_program = NULL,
case = "snake"
)
|
metadata |
A metadata table created by |
permanent_names |
A character vector of names to keep. |
survey_program |
If |
case |
Unless it is set to |
A metadata
tibble augmented with $var_name_suggested
Other harmonization functions:
collect_val_labels()
,
harmonize_na_values()
,
harmonize_values()
,
harmonize_var_names()
,
label_normalize()
,
suggest_permanent_names()
1 2 3 4 5 6 7 8 9 10 11 12 | examples_dir <- system.file("examples", package = "retroharmonize")
survey_list <- dir(examples_dir)[grepl("\\.rds", dir(examples_dir))]
example_surveys <- read_surveys(
file.path(examples_dir, survey_list),
save_to_rds = FALSE)
metadata <- lapply ( X = example_surveys, FUN = metadata_create )
metadata <- do.call(rbind, metadata)
utils::head(
suggest_var_names(metadata, survey_program = "eurobarometer" )
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.