# R script for drawing side-by-side boxplots of estimates # obtained in the "random rectangles" activity. # # Input file contains two columns of data: first column # contains the estimates obtained with nonrandom sampling, # and the second column contains the estimates obtained # with random sampling. rec.data=read.table("rectangles.txt",header=TRUE,sep=" ") attach(rec.data) boxplot(nonrandom,random,range=0,names=c("Nonrandom","Random"), boxwex=.5,ylab="Estimates of mean area") abline(h=7.42,lty=2) detach(rec.data)