r i = {{i}}

{{i+1}}. Analysis for trait r traits[i]

lc <- ck.abd(traits[i], geno, rep, dfr)

# Remove checks without data or with only one datum

if (lc$nck.0 > 0 | lc$nck.1 > 0) {
  temp <- dfr[!(dfr[, geno] %in% c(lc$ck.0, lc$ck.1)), ]
} else {
  temp <- dfr
}

# Remove missing values for DAU.test

temp <- temp[!is.na(temp[, traits[i]]), ]

# Fit model

y <- temp[, traits[i]]
model <- agricolae::DAU.test(temp[, rep], temp[, geno], y)

{{i+1}}.1. General setting

r if(lc$nmis == 0 & lc$nmis.ck == 0) {"For this trait there are no missing values."} r if(lc$nmis == 1) {"There is one genotype with missing value. This genotype has been removed."} r if(lc$nmis > 1) paste("There are", lc$nmis, "genotypes with missing values. These genotypes have been removed.") r if(lc$nmis > 0) paste("Therefore, there are", lc$ng - lc$nmis, "genotypes included in the analysis.")

r if(lc$nck.0 == 1) paste0("There is one check without data: ", lc$ck.0, ". This check has been removed.") r if(lc$nck.0 > 1) paste0("There are ", lc$nck.0, " checks without data: ")

if(lc$nck.0 > 1)
  lc$ck.0

r if(lc$nck.0 > 1) {"These checks have been removed."}

r if(lc$nck.1 == 1) paste0("There is one check with data in only one block: ", lc$ck.1, ". Checks need at least two replications so this check has been removed.") r if(lc$nck.1 > 1) paste0("There are ", lc$nck.1, " checks with data in only one block: ")

if(lc$nck.1 > 1)
  lc$ck.1

r if(lc$nck.1 > 1) {"Checks need at least two replications so these checks have been removed."}

{{i+1}}.2. Adjusted means

model$means

{{i+1}}.3. Overall mean and CV

model$statistics

{{i+1}}.4. LSD test

model$groups


CIP-RIU/hidap documentation built on April 30, 2021, 9:21 p.m.