Skip to contents

This function creates a summary statistics table for EMBRACE-II data with customized formatting. It combines mean, SD, median, IQR, and range statistics into a single row per variable and includes section information based on variable suffixes.

Usage

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

Arguments

data

A tibble containing EMBRACE-II data

save_excel

Logical; if TRUE, saves the data frame as an Excel file

excel_path

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

Value

A tibble containing summarized statistics with one row per variable, including section information

Examples

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