if (FALSE) {
library(agridat)
data(williams.barley.uniformity)
dat <- williams.barley.uniformity
libs(desplot)
desplot(dat, yield ~ col*row,
aspect= 75/36, # true aspect
main="williams.barley.uniformity")
# Smoothed contour/persp plot like Williams Fig 1b, 2b
libs(lattice)
dat$fit <- fitted(loess(yield~col*row, dat, span=.1))
contourplot(fit~col*row, data=dat,
aspect=75/36, region=TRUE, col.regions=RedGrayBlue,
main="williams.barley.uniformity")
wireframe(fit~col*row, data=dat, zlim=c(100, 350),
main="williams.barley.uniformity")
# Williams table 1
anova(aov(yield ~ factor(row) + factor(col), dat))
}
Run the code above in your browser using DataLab