if (FALSE) {
library(agridat)
data(theobald.barley)
dat <- theobald.barley
dat <- transform(dat, env=paste(loc,year,sep="-"))
dat <- transform(dat, income=100*yield - 400*nitro/1000)
libs(lattice)
xyplot(income~nitro|env, dat, groups=gen, type='b',
auto.key=list(columns=3), main="theobald.barley")
}
Run the code above in your browser using DataLab