library(EstimateBreed)
#Obtain environmental deviations
data("desvamb")
head(desvamb)
#Use DPclim for the ISGR function to identify deviations correctly
DPclim <- with(desvamb,desv_clim(ENV,TMED,PREC))
#Calculate the ISGR
data("genot")
head(genot)
isgr_index <- with(genot, isgr(GEN,ENV,NG,MG,CICLO))
#Define the water requirement per stage
isgr_index <- with(genot, isgr(GEN,ENV,NG,MG,CICLO,req=5,stage="rep"))
Run the code above in your browser using DataLab