Learn R Programming

prada (version 1.48.0)

barploterrbar: Barplot with error bars.

Description

Barplot with error bars.

Usage

barploterrbar(y, yl, yh, barcol="orange", errcol="black", horiz=FALSE, w=0.2, ylim=c(0, max(yh)*1.05), ...)

Arguments

y
Numeric vector.
yl
Numeric vector of same length as y.
yh
Numeric vector of same length as y.
barcol
Color of the bars.
errcol
Color of the error bars.
horiz
Logical. As in barplot.
w
The plot limits. The default value wil cause the error bars to fit nicely on the plotting device.
ylim
Size of the error bar ticks.
...
Further arguments that get passed on to barplot.

Value

Details

The function calls barplot with y and decorates it with error bars according to yl and yh.

See Also

barplot

Examples

Run this code
  y <- matrix(runif(80), ncol=5)
  ym <- apply(y, 2, mean)
  dy <- apply(y, 2, sd)*2/sqrt(nrow(y))
  barploterrbar(ym, ym-dy, ym+dy, barcol="#0000c0", errcol="orange",
    ylim=c(0, max(ym+dy)))

Run the code above in your browser using DataLab