draw_error_bars.Rd
Adds error bars to an existing plot.
draw_error_bars(
x,
lower = NULL,
upper = NULL,
arrow = TRUE,
flip = FALSE,
length = 0.05,
code = 3,
angle = 90,
border = NA,
columns = NULL,
...
)
Either a numeric vector or a data frame. If a numeric vector, specifies the positions at which error bars should be drawn.
A numeric vector with the lower limits for error bars.
A numeric vector with the upper limits for error bars.
Logical; if TRUE
,
adds error bars using graphics::arrows,
otherwise adds error bars using
graphics::polygon instead.
Logical; if TRUE
, error bars
are drawn at positions on the y-axis with limits
specified over the x-axis; otherwise, error bars
are drawn at positions on the x-axis with limits
specified over the y-axis.
The length of the arrowhead for the call to graphics::arrows.
Integer controlling whether to draw an arrowhead at the start (1), end (2), or at both ends (3) of the line for the call to graphics::arrows.
The angle of the lines creating the arrowhead for the call to graphics::arrows. Using 90 degrees results in a flat bar per typical error bars.
The color of the border for calls to graphics::polygon.
A character vector, the columns for the
positions and lower/upper limits, respectively, if
x
is a data frame.
Additional plotting parameters for either the graphics::arrows or graphics::polygon.