# NOT RUN {
library(metan)
# AMMI model
model <- waas(data_ge,
env = ENV,
gen = GEN,
rep = REP,
resp = everything())
# GY x PC1 for variable GY (default plot)
plot_scores(model)
# PC1 x PC2 (variable HM)
#
plot_scores(model,
polygon = TRUE, # Draw a convex hull polygon
var = "HM", # or var = 2 to select variable
highlight = c("G1", "G2"), # Highlight genotypes 2 and 3
type = 2) # type of biplot
# PC3 x PC4 (variable HM)
# Change size of plot fonts and colors
# Minimal theme
plot_scores(model,
var = "HM",
type = 2,
first = "PC3",
second = "PC4",
col.gen = "black",
col.env = "gray",
col.segm.env = "gray",
size.tex.gen = 5,
size.tex.env = 2,
size.tex.lab = 16,
plot_theme = theme_metan_minimal())
# WAASB index
waasb_model <- waasb(data_ge, ENV, GEN, REP, GY)
# GY x WAASB
# Highlight genotypes 2 and 8
plot_scores(waasb_model,
type = 3,
highlight = c("G2", "G8"))
# }
Run the code above in your browser using DataLab