y=dget("rats.dat") x = c(8.0, 15.0, 22.0, 29.0, 36.0) xbar = 22; #mean y N = 30; #number of rats T = 5; #number of repeated measures group=c(rep(1,15),rep(2,15)) pdf("rats.data.pdf", width=4, height=4, horiz=FALSE) plot(0,0,type="n",xlab="day",ylab="weight of rats", main="",xlim=range(x), ylim=range(y)) for (i in 1:N) { lines(x,y[i,],col=group[i]) } legend(25, 180, c("trt 1", "trt 2"), col=1:2, bty="n", lty=1) dev.off()