Creates a forest plot with or without confidence intervals. See the "Getting Started" vignette for usage and examples.
plot_forest(
data,
summary_label = NULL,
vline_intercept = 0,
annotate_CI = TRUE,
shaded_interval = NULL,
digits = 3,
maxex = NULL,
x_lab = "Effect",
y_lab = NULL,
CI_label = NULL,
CI_bracket_open = c("[", "("),
CI_bracket_close = c("]", ")"),
caption = NULL,
text_size = 3.5,
plot_width = 8,
x_breaks = NULL,
x_limit = NULL,
jitter_reps = FALSE,
shapes = c("diamond", "square", "circle", "triangle"),
shape_size = 3.5,
ggplot_theme = ggplot2::theme_bw(),
...
)
a dataframe or tibble that contains the summarized data you want
to plot. This must be in the same format as the tibble that is output by
summarize_data()
. See "Output Data" in Details section of summarize_data()
documentation.
(optional) labeler function created using ggplot2::as_labeller
. Labels for group and metagroup.
(optional) numeric. Default 0.
logical. Default TRUE
. Show a table next to the graph with the numeric values for the confidence interval.
numeric vector. Specified as c(lo, hi) for the interval you want to shade over. Default is NULL.
numeric. Number of significant digits to round the table values to. Passed through to pmtables::sig()
numeric. Maximum number of significant digits before moving to scientific notation. Passed through to pmtables::sig()
.
string. x-axis label.
string. Default is not to label y axis.
string. Label above the CI table. Ignored if annotate_CI
is FALSE
.
string. Denotes whether to use brackets ([
) or parentheses ((
) for the opening interval. Ignored if annotate_CI
is FALSE
.
string. Denotes whether to use brackets (]
) or parentheses ()
) for the closing interval. Ignored if annotate_CI
is FALSE
.
string. A patchwork styled caption for the overall plot.
numeric. Text size for labels. Must be at least 3.5
numeric. Value between 1 and 12 to denote the ratio of plot : CI table
numeric vector of breaks to be used for the x-axis. See scale_x_continuous() for details.
numeric vector (c(lo, hi)) specifying the minimum and maximum values to show on the x-axis. See coord_cartesian() for details
logical. Whether or not to vertically "jitter" the additional confidence intervals when using multiple replicates (i.e. when input data has 9 numeric columns instead of 3).
string. Denotes the shape of the mean/median value, passed to ggplot2::geom_point()
.
Can be one of the following: "square", "diamond", "circle", or "triangle".
numeric. Value between 1 and 4 that denotes the relative size of the shape
argument. Defaults to 3.5.
a ggplot theme. Note that some legend options, text size, and grid elements may be overwritten.
See ggplot2::theme()
for details.
additional args passed to patchwork::wrap_plots()
for metagrouped plots.