if (FALSE) {
require(agridat)
data(heath.radish.uniformity)
dat <- heath.radish.uniformity
libs(desplot, dplyr)
desplot(dat, yield ~ col*row|block,
aspect=1,
main="heath.radish.uniformity")
# Indicator for border/interior plants
dat <- mutate(dat,
inner = row > 1 & row < 10 & col > 1 & col < 10)
# Heath has 5.80 and 9.63 (we assume this is a typo of 9.36)
dat <- group_by(dat, inner)
summarize(dat, mean=mean(yield, na.rm=TRUE))
# Interior plots are significantly lower yielding
anova(aov(yield ~ block + inner, dat))
# lattice::bwplot(yield ~ inner, dat, horiz=0)
# similar to Heath fig 2-2
# lattice::histogram( ~ yield|inner, dat, layout=c(1,2), n=20)
}
Run the code above in your browser using DataLab