panel_ci: Panel CI

View source: R/panels.R

panel_ciR Documentation

Panel CI

Description

Panel with points and confidence intervals.

Usage

panel_ci(
  data,
  y = rev(seq.int(nrow(data))),
  col = 1L,
  cex = NULL,
  pch = NULL,
  diamond = NULL,
  cex.diamond = 5,
  xlim = extendrange(unlist(data)),
  limits = xlim,
  logx = FALSE,
  panel.first = NULL,
  panel.last = NULL,
  vline = 1,
  type,
  ...
)

Arguments

data

a data frame or matrix with three columns containing the point value, lower limit, and upper limit, respectively

y

y-coordinates where each row of data is plotted

col, cex, pch

color, size, plotting character for each, recycled as needed

xlim

x-axis limits

limits

limits for intervals; values outside of limits will be truncated and drawn as an arrow

logx

logical; if TRUE, use a logarithmic x-axis

panel.first, panel.last

expressions to be evaluated before and after any plotting; see plot.default

vline

x-position of the vertical dashed line; use NA for no line

type

ignored

...

additional arguments passed to plot.default

See Also

Other panel functions: panel_box(), panel_tplot()

Examples

dd <- data.frame(
  x = 1,
  lci = 1 - 1 / 1:10,
  uci = 1 + 1 / 1:10
)

panel_ci(dd[1:10, ])
panel_ci(dd[1:10, ], diamond = c(1, 5, 10))
panel_ci(dd[1:10, ], limits = c(0.25, 1.5))
panel_ci(dd[1:10, ], limits = c(0.25, 0.95))


raredd/forest documentation built on Feb. 19, 2024, 9:22 p.m.