# NOT RUN {
## NASA space shuttle o-ring failures -- from graphics package
d <- data.frame(temperature=c(53,57,58,63,66,67,67,67,68,69,70,70,70,70,
72,73,75,75,76,76,78,79,81),
fail=factor(c(2,2,2,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,1,1,1,1),
levels=1:2,labels=c("no","yes")))
## Default plot (using formula notation)
plotBinResp(fail~temperature,data=d)
## Controlling where proportions are computed
plotBinResp(fail~temperature,data=d,breaks=seq(50,85,5))
plotBinResp(fail~temperature,data=d,breaks=10)
## Don't plot points, just plot proportions
plotBinResp(fail~temperature,data=d,plot.pts=FALSE)
## Change left y-axis ticks
plotBinResp(fail~temperature,data=d,yaxis1.ticks=c(0,1),yaxis1.lbls=c(0,1))
# }
Run the code above in your browser using DataLab