dat <- pacheco.soybean
# AMMI biplot similar to Fig 2 of Pacheco et al.
require(agricolae)
m1 <- with(dat, AMMI(env, gen, REP=1, yield))
bip <- m1$biplot[,1:3]
# Fig 1 of Pacheco et al.
with(bip, plot(yield, PC1, cex=0.0,
text(yield,PC1,labels=row.names(bip), col="blue"),
xlim=c(1000,3000),main="AMMI BIPLOT",frame=TRUE))Run the code above in your browser using DataLab