library(EstimateBreed)
GEN <- rep(paste("G", 1:5, sep=""), each = 3)
REP <- rep(1:3, times = 5)
MG <- c(78.5, 80.2, 79.1, 81.3, 82.0, 80.8, 76.9, 78.1, 77.5, 83.2,
84.1, 82.9, 77.4, 78.9, 79.3)
data <- data.frame(GEN, REP, MG)
trit <- with(data,hw(GEN,MG,crop="trit"))
#Extract the average PH per genotype
trit <- with(data,hw(GEN,MG,crop="trit",stat="mean"))
Run the code above in your browser using DataLab