View source: R/summarydata.h.R
summarydata | R Documentation |
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.
summarydata(
data,
vars,
date_vars = NULL,
distr = FALSE,
summary_format = "standard",
grvar = NULL,
pivot_layout = "clinical",
include_confidence = TRUE,
advanced_metrics = FALSE,
pivot_export = FALSE,
summarytools_graphs = TRUE,
summarytools_round_digits = 2
)
data |
The data as a data frame. |
vars |
a string naming the variables from |
date_vars |
Variables containing date/time data to be analyzed with date-specific statistics (similar to sumvar's dist_date function) |
distr |
If TRUE, additional distribution diagnostics (Shapiro-Wilk test, skewness, and kurtosis) will be computed and explained. |
summary_format |
Choose the format for summary statistics display. New summarytools options provide publication-ready automated EDA summaries with embedded visualizations. |
grvar |
Optional grouping variable to stratify the summary statistics by categories. |
pivot_layout |
Layout style for pivottabler enhanced summaries. |
include_confidence |
Include confidence intervals in pivot summary tables. |
advanced_metrics |
Include advanced metrics like IQR, MAD, and robust statistics. |
pivot_export |
Enable enhanced export capabilities for pivot tables. |
summarytools_graphs |
Include histograms and bar charts in summarytools dfSummary output. |
summarytools_round_digits |
Number of decimal places for summarytools output. |
A results object containing:
results$todo | a html | ||||
results$text | a html | ||||
results$text1 | a html | ||||
results$pivot_summary | a html | ||||
results$pivot_export_info | a html | ||||
# 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.