dat <- smith.corn.uniformity
require(lattice)
dat = transform(dat, year=factor(year))
desplot(yield~col*row|year, dat, layout=c(1,3),
main="Uniformity trial across years 1895-1987")
# Outliers are obvious
xyplot(yield~row|factor(col), dat, groups=year, auto.key=TRUE)
require(rgl)
# A few odd pairs of outliers in column 6
plot3d(dat$col, dat$row, dat$yield, col=dat$year)Run the code above in your browser using DataLab