if (FALSE) {
library(agridat)
data(kang.peanut)
dat <- kang.peanut
# Table 5.1 of Kang et al. (Chapter 5 of Saxton)
libs(reshape2)
Y0 <- acast(dat, env~gen, value.var='yield', fun=mean)
round(Y0,2)
# GGE biplot of Kang, p. 82.
libs(gge)
m1 <- gge(dat, yield~gen*env, scale=FALSE)
biplot(m1, flip=c(1,1), main="kang.peanut - GGE biplot")
# Forkman 2019, fig 2
# m2 <- gge(dat, yield~gen*env, scale=TRUE)
# biplot(m2, main="kang.peanut - GGE biplot")
# biplot(m2, comps=3:4, main="kang.peanut - GGE biplot")
}
Run the code above in your browser using DataLab