error.bar: Plots error bars on a base R plot

View source: R/error.bar.r

error.barR Documentation

Plots error bars on a base R plot

Description

Plots error bars on a base R plot

Usage

error.bar(x, y, upper.y, lower.y = upper.y, upper.x, lower.x = upper.x,
  length = 0.03, x.bar = F, y.bar = T, interval.type = "dist", ...)

Arguments

x

a numeric vector palcement of error bars on the x-axis

y

a numeric vector of the y-origins of the error bars

upper.y

A vector of the upper y limits for error bars

lower.y

A vector of the lower y limits for error bars, set to upper.y by default

upper.x

A vector of the upper x limits for error bars

lower.x

A vector of the lower x limits for error bars, set to upper.x by default

length

the length of the cap on the error bars

x.bar

Logical indicating whether to include horizontal error bars

y.bar

Logical indicating whether to include vertical error bars

interval.type

If this is set to "dist", upper.y is set to y+upper.y

Details

Puts error bars on a plot. The default has only y error bars, you must define the vectors x,y, and upper.y (your error vector) at a minimum. Lower and upper error can be set separately by also defining lower.y. To display x error bars set x.bar=T and upper.x to a vector containing your x error. type is set to either "dist" as in distance from the mean or "value" which is the actual lower/upper bound


evanchildress/plotHacks documentation built on July 29, 2022, 5 a.m.