Skip to contents

This function loads data from EMBRACE-II website exports, processes them, and joins them by the `embrace_id` column.

Usage

load_embrace_ii(
  file_path = here::here("data_raw/embrace_II/emii.xlsx"),
  file_path_eqd2 = here::here("data_raw/embrace_II/emii_eqd2.xlsx"),
  add_new_columns = T,
  mapping_file = here::here("data_raw/mapping_table/mapping_table.xlsx"),
  include_only_study_patients = TRUE,
  replace_minusone_with_na = TRUE
)

Arguments

file_path

The path to the directory containing the primary data files.

file_path_eqd2

The path to the EMBRACE-II EQD2 Excel file.

add_new_columns

If TRUE, calculate and add new columns

mapping_file

Path to the mapping table file

include_only_study_patients

If TRUE, only return patients included in the study

Value

A tibble containing the cleaned and joined data.

Examples

if (FALSE) { # \dontrun{
  df <- load_embrace_ii(file_path = "/path/to/xlsx", file_path_eqd2 = "/path/to/eqd2_xlsx")
} # }