Description Usage Arguments Details Value Author(s) Examples
Draw vertical error bar(s) on a plot
1 2 |
x |
Vector of x value on the plot around which the vertical error bar will be drawn |
width |
The total width of the cross hatches on top and bottom of the bars, can be a vector or a single value |
center |
Vector of values designating the vertical center of the error bars, can be a vector or a single value |
barLength |
The total vertical length of the bars, can be a vector or a single value |
min.y |
Vector of values indicating the vertical bottoms of the bars |
max.y |
Vector of values indicating the vertical tops of the bars |
blankMiddle |
the vertical length of a blank spot that will be produced in the middle of
the error bar. This is useful when the bar is placed around symbols (so as not to overwrite them).
Defaults to |
... |
additional arguments to |
Buyer beware! It's up to the user to determine what the statistically correct length of the error bar should be.
Either center
and barLength
must be specified, or min.y
and
max.y
must be specifed.
Note that width
, center
, barLength
, min.y
, max.y
,
and blankMiddle
should be NULL
, numeric values of length 1, or numeric values with
the same length as x
. If they have the same length of x
, the bars can have
different vertical lengths, widths, and blankMiddle
values if desired.
Nothing is returned, the error bar(s) is/are drawn on the plot
Landon Sego
1 2 3 4 5 6 7 8 9 10 11 | set.seed(343)
# Make a plot of some standard normal observations
x <- 1:9
y <- rnorm(9)
plot(x, y, pch = as.character(1:9), ylim = c(-2, 2) + range(y),
ylab = "Z", xlab = "Indexes")
# Draw the error bars
vertErrorBar(x, 0.3, center = y, barLength = 2 * 1.96, blankMiddle = 0.25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.