library(agricolae)
# Index AMMI
data(plrv)
model<- with(plrv,AMMI(Locality, Genotype, Rep, Yield, console=FALSE))
Idx<-index.AMMI(model)
names(Idx)
# Crops with improved stability according AMMI.
print(Idx[order(Idx[,3]),])
# Crops with better response and improved stability according AMMI.
print(Idx[order(Idx[,4]),])
Run the code above in your browser using DataLab