dat <- minnesota.barley.yield
dat$yr <- factor(dat$year)
# Drop Dryland, Jeans, CompCross, MechMixture because they have less than 5
# year-loc values
dat <- droplevels(subset(dat, !is.element(gen, c("CompCross","Dryland","Jeans","MechMixture"))))
# View all data with columns for each location
require("latticeExtra")
useOuterStrips(dotplot(gen~yield|site*yr, dat,
scales=list(y=list(cex=.5))),
strip = strip.custom(par.strip.text = list(cex = 0.75)),
strip.left = strip.custom(par.strip.text = list(cex = 0.75)))
# 1934 has huge swings from one loc to the next
dotplot(gen~yield|site, dat, groups=yr,
auto.key=list(columns=5), scales=list(y=list(cex=.5)))Run the code above in your browser using DataLab