single_comp_plot function

Plot single comparison ggplot in baggr_compare style

Plot single comparison ggplot in baggr_compare style

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

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

Returns

a ggplot2 object

  • Maintainer: Witold Wiecek
  • License: GPL (>= 3)
  • Last published: 2024-02-12