errorbars: Error bars.

Description Usage Arguments Author(s) References Examples

View source: R/errorbar.R

Description

This functions adds error bars to a plot or, optionally, plots points and added error bars.

Usage

1
errorbars (x, y, top, bottom = top, length = .2, add = TRUE, ...)

Arguments

x

X axis positions.

y

Y axis positions.

top

Top error bar length.

bottom

Bottom error bar length.

length

The length of the horizontal bars.

add

If TRUE, error bars are added to existing plot.

...

Additional arguments go to the internal call of arrows() which draws the error bars.

Author(s)

Santiago Barreda <[email protected]>

References

Inspired by a similar function first seen here:

http://monkeysuncle.stanford.edu/?p=485

Examples

1
2
3
4
5
6
## add bars to existing plots 
plot (1:10, 1:10, col = 4, pch = 18)
errorbars (1:10, 1:10, .5, col = 4)

## or create a new plot
errorbars (1:10, 1:10, 2, add = FALSE)

phonTools documentation built on May 29, 2017, 9 a.m.