Learn R Programming

forestmodel (version 0.6.2)

panel_forest_plot: Plot a forest plot with panels of text

Description

Plot a forest plot with panels of text

Usage

panel_forest_plot(
  forest_data,
  mapping = aes(estimate, xmin = conf.low, xmax = conf.high),
  panels = default_forest_panels(),
  trans = I,
  funcs = NULL,
  format_options = list(colour = "black", shape = 15, banded = TRUE, text_size = 5,
    point_size = 5),
  theme = theme_forest(),
  limits = NULL,
  breaks = NULL,
  recalculate_width = TRUE,
  recalculate_height = TRUE,
  exclude_infinite_cis = TRUE
)

Arguments

forest_data

data.frame with the data needed for both the plot and text

mapping

mapping aesthetic created using aes

panels

list with details of the panels that make up the plot (See Details)

trans

transform for scales

funcs

optional list of functions required for formatting panels$display

format_options

formatting options as a list as generated by forest_model_format_options

theme

theme to apply to the plot

limits

limits of the forest plot on the X-axis (taken as the range of the data by default)

breaks

breaks to appear on the X-axis (note these will be exponentiated if exponentiate == TRUE)

recalculate_width

TRUE to recalculate panel widths using the current device or the desired plot width in inches

recalculate_height

TRUE to shrink text size using the current device or the desired plot height in inches

exclude_infinite_cis

whether to exclude points and confidence intervals that go to positive or negative infinity from plotting. They will still be displayed as text. Defaults to TRUE, since otherwise plot is malformed

Value

A ggplot ready for display or saving