br_show_forest | R Documentation |
This function takes regression results and formats them into a forest plot display. It handles:
Formatting of estimates, CIs and p-values
Automatic x-axis limits calculation
Cleaning of redundant group/focal variable labels
Custom subsetting and column dropping
The function uses forestploter::forest()
internally for the actual plotting.
br_show_forest(
breg,
clean = TRUE,
rm_controls = FALSE,
...,
subset = NULL,
drop = NULL,
tab_headers = NULL
)
breg |
A regression object with results (must pass |
clean |
Logical indicating whether to clean/condense redundant group/focal variable labels.
If |
rm_controls |
If |
... |
Additional arguments passed to |
subset |
Expression for subsetting the results data ( |
drop |
Column indices to drop from the display table. |
tab_headers |
Character vector of custom column headers (must match number of displayed columns). |
A plot
Other br_show:
br_show_fitted_line()
,
br_show_fitted_line_2d()
,
br_show_forest_ggstats()
,
br_show_forest_ggstatsplot()
,
br_show_risk_network()
,
br_show_table()
,
br_show_table_gt()
m <- br_pipeline(mtcars,
y = "mpg",
x = colnames(mtcars)[2:4],
x2 = "vs",
method = "gaussian"
)
br_show_forest(m)
br_show_forest(m, clean = TRUE, drop = 3)
br_show_forest(m, clean = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.