single_comp_plot: Plot single comparison ggplot in 'baggr_compare' style

View source: R/baggr_compare.R

single_comp_plotR Documentation

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 = 2,
  values_size = 2.5
)

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

Value

a ggplot2 object


baggr documentation built on March 31, 2023, 10:02 p.m.