panel.errbars {memisc} | R Documentation |
Panel Functions for Error Bars
Description
panel.errbars
plots points are draws a line suppelemented
with error bars.
Usage
panel.errbars(x,y,...,panel.xy=panel.xyplot,
make.grid=c("horizontal","vertical","both","none"),ewidth=0)
Arguments
x,y |
numeric values, the points around which error bars are plotted.
x is a numeric vector, y is a matrix with three columns,
the values, the lower and the upper ends of the error bars.
|
... |
graphical parameters passed to panel.xy |
panel.xy |
panel function to produce the plot to which error bars are added |
make.grid |
character string, determines the direction of grid lines added to the plot |
ewidth |
numerical value, width of the whiskers of the error bars |
See Also
panel.xyplot
Examples
library(lattice)
library(grid)
applications <- aggregate(percent(Dept,weight=Freq,ci=TRUE)~Gender,
data=UCBAdmissions)
admissions <- aggregate(
percent(Admit=="Admitted",weight=Freq,ci=TRUE)~Dept+Gender,
data=UCBAdmissions)
xyplot(cbind(Percentage,lower,upper)~Gender|Dept,data=admissions,
panel=panel.errbars,
ewidth=.2,pch=19,
ylab="Percentage applicants admitted by Department")
xyplot(cbind(Percentage,lower,upper)~Gender|Dept,data=applications,
panel=panel.errbars,
ewidth=.2,pch=19,
ylab="Percentage applications to the Department")
[Package
memisc version 0.95-17
Index]