Skip to contents

This function takes a clean EMBRACE-II data frame and creates a data dictionary that maps variable names to their corresponding sections based on suffixes.

Usage

emii_get_data_dictionary(data, save_excel = FALSE, excel_path = NULL)

Arguments

data

A tibble containing clean EMBRACE-II data (output from emii_get_clean_data)

save_excel

Logical; if TRUE, saves the dictionary as an Excel file

excel_path

Character; path where to save the Excel file (default: NULL)

Value

A tibble containing variable names and their corresponding sections

Examples

if (FALSE) { # \dontrun{
  clean_data <- emii_get_clean_data()
  dict <- emii_get_data_dictionary(clean_data)
  dict <- emii_get_data_dictionary(clean_data, save_excel = TRUE)
} # }