Learn R Programming

baggr (version 0.7.8)

single_comp_plot: Plot single comparison ggplot in baggr_compare style

Description

Plot single comparison ggplot in baggr_compare style

Usage

single_comp_plot(
  df,
  title = "",
  legend = "top",
  ylab = "",
  grid = F,
  points = FALSE,
  add_values = FALSE,
  values_digits = 1,
  values_size = 4
)

Value

a ggplot2 object

Arguments

df

data.frame with columns group, median, lci, uci, model (character or factor listing compared models) and, optionally, parameter (character or factor with name of parameter)

title

ggtitle argument passed to ggplot

legend

legend.position argument passed to ggplot

ylab

Y axis label

grid

logical; if TRUE, facets the plot by values in the parameter column

points

you can optionally specify a (numeric) column that has values of points to be plotted next to intervals

add_values

logical; if TRUE, values will be printed next to the plot, in a style that's similar to what is done for forest plots

values_digits

number of significant digits to use when printing values,

values_size

size of font for the values, if add_values == TRUE