| TernTables-package | R Documentation |
TernTables generates publication-ready summary tables for descriptive
statistics and group comparisons. It automatically detects variable types
(continuous, binary, or categorical), selects appropriate
statistical tests, and formats results for direct export to Word or Excel.
Numeric variables can be designated as ordinal via force_ordinal.
ternGGrouped comparison table for 2- or 3-level group variables.
ternDDescriptive-only summary table (no grouping).
word_exportExport a TernTables tibble to a formatted Word document.
write_methods_docGenerate a methods Word document describing tests used.
val_p_formatFormat a P value for publication.
val_formatFormat a numeric value with rounding rules.
Welch's t-test or Wilcoxon rank-sum, routed by ROBUST logic.
Welch ANOVA or Kruskal-Wallis, routed by ROBUST logic per group.
Chi-squared or Fisher's exact, based on expected cell counts.
Wilcoxon rank-sum (2 groups) or Kruskal-Wallis (3+ groups).
ROBUST routing uses four gates: (1) n < 3 \Rightarrow non-parametric (fail-safe);
(2) |skewness| > 2 in any group \Rightarrow non-parametric;
(3) all groups n \geq 30 \Rightarrow parametric (CLT);
(4) otherwise Shapiro-Wilk p > 0.05 in all groups \Rightarrow parametric.
See vignette("getting-started", package = "TernTables") for a
walkthrough using the bundled tern_colon dataset.
TernTables is available as a free point-and-click web application at
https://tern-tables.com/ — no R installation required. Upload a
CSV or XLSX file, configure the analysis through a simple interface, and
download a publication-ready Word table. The web application is powered
by this R package; all statistical methods and outputs are identical to
calling ternG(), ternD(), and ternP() directly.
Maintainer: Joshua D. Preston joshua.preston@emory.edu (ORCID)
Authors:
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.