Skip to contents

This module generates descriptive statistics for continuous variables. It provides both a textual summary and a visually appealing summary table. Optionally, you can enable distribution diagnostics to examine normality, skewness, and kurtosis.

Usage

summarydata(
  data,
  vars,
  distr = FALSE,
  decimal_places = 1,
  outliers = FALSE,
  report_sentences = FALSE
)

Arguments

data

The data as a data frame.

vars

a string naming the variables from data that contains the continuous values used for the report

distr

If TRUE, additional distribution diagnostics (Shapiro-Wilk test, skewness, and kurtosis) will be computed and explained.

decimal_places

Number of decimal places to display for statistical measures.

outliers

If TRUE, detect and report potential outliers using IQR method. Helpful for quality control and identifying data entry errors.

report_sentences

If TRUE, generate copy-ready clinical report sentences for direct use in medical documentation.

Value

A results object containing:

results$todoa html
results$texta html
results$text1a html
results$clinicalInterpretationa html
results$aboutAnalysisa html
results$outlierReporta html
results$reportSentencesa html
results$glossarya html

Examples

# \donttest{
# Example:
# 1. Load your data frame.
# 2. Select one or more continuous variables.
# 3. (Optional) Enable Distribution Diagnostics to view additional tests.
# 4. Run the summarydata module to see descriptive statistics and distribution characteristics.
# }