Description Usage Arguments Details Author(s) References
Draw error bars on an existing plot
1 |
x |
A numeric. The x position |
y |
A numeric. The y position |
upper, lower |
A numeric. The value to add (upper) and subtract (lower) to y (or x, depending on the direction). |
length |
A numeric. The length of the edges of the arrowhead (as defined by |
dir |
A string. The direction of the error bars (either 'x' or 'y') |
... |
Additional arguments passed to |
Note that upper
and lower
are added / substracted from y (or x, depending on direction). So a smart call to error_bar might be:
error_bar(x,y,sd(y))
Daniel Pritchard
Adapted from here: http://monkeysuncle.stanford.edu/?p=485
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.