Skip to contents

Loads data from EMBRACE-I and EMBRACE-II studies, processes them, and combines them into a single dataframe with harmonized column names.

Usage

load_combined_embrace(
  file_path_i = here::here("data_raw/embrace_I"),
  file_path_ii = here::here("data_raw/embrace_II/emii.xlsx"),
  file_path_eqd2 = here::here("data_raw/embrace_II/emii_eqd2.xlsx"),
  mapping_file = here::here("data_raw/mapping_table/mapping_table.xlsx"),
  return_common_columns = T
)

Arguments

file_path_i

Character, path to the EMBRACE-I data root folder

file_path_ii

Character, path to the EMBRACE-II Excel file

file_path_eqd2

Character, path to the EMBRACE-II EQD2 Excel file

mapping_file

Character, path to the column mapping table Excel file

return_common_columns

Logical, if TRUE, return only columns present in both datasets

Value

A tibble containing the cleaned and combined data from both studies

Examples

if (FALSE) { # \dontrun{
# Load with default paths
combined_data <- load_combined_embrace()

# Load with custom paths and return all columns
combined_data <- load_combined_embrace(
  file_path_i = "path/to/embrace_I",
  file_path_ii = "path/to/emii.xlsx",
  file_path_eqd2 = "path/to/emii_eqd2.xlsx",
  mapping_file = "path/to/mapping_table.xlsx",
  return_common_columns = FALSE
)
} # }