View source: R/model_comparison.R
| format_comparison_table | R Documentation |
Creates a formatted table comparing model fits for publication or reporting.
format_comparison_table(comparison_obj, format = "console", digits = 3)
comparison_obj |
A model_comparison object from compare_models() |
format |
Character. Output format: "console" (default), "markdown", "latex" |
digits |
Integer. Number of decimal places (default = 3) |
Creates a publication-ready table with key statistics for each model:
2-HT: Parameters (dP, dA, b, g), AIC, BIC
EIG: Information gain, efficiency
Full ROC: AUC
For format = "console", the comparison dataframe. For
"markdown" and "latex", a knitr_kable object, which
is a character vector with **one element per line**. Print it with
cat(x, sep = "\n") inside a chunk using results = "asis";
plain cat(x) joins the lines with spaces and the table collapses
into a single paragraph.
data(lineup_example)
comparison <- compare_models(lineup_example)
format_comparison_table(comparison)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.