if (FALSE) {
library(agridat)
data(smith.beans.uniformity)
dat1 <- subset(smith.beans.uniformity, expt=="E1")
dat2 <- subset(smith.beans.uniformity, expt=="E2")
dat3 <- subset(smith.beans.uniformity, expt=="E3")
dat4 <- subset(smith.beans.uniformity, expt=="E4")
cv <- function(x) { sd(x)/mean(x) }
cv(dat1$yield)
cv(dat2$yield) # Does not match Smith. Checked all values by hand.
cv(dat3$yield)
cv(dat4$yield)
libs("desplot")
desplot(dat1, yield ~ col*row,
aspect=180/45, flip=TRUE, # true aspect
main="smith.beans.uniformity, expt 1 (true aspect)")
desplot(dat2, yield ~ col*row,
aspect=180/45, flip=TRUE, # true aspect
main="smith.beans.uniformity, expt 2 (true aspect)")
desplot(dat3, yield ~ col*row,
aspect=450/80, flip=TRUE, # true aspect
main="smith.beans.uniformity, expt 3 (true aspect)")
desplot(dat4, yield ~ col*row,
aspect=450/80, flip=TRUE, # true aspect
main="smith.beans.uniformity expt 4, (true aspect)")
}
Run the code above in your browser using DataLab