[R] LSD-test

Ahmed Attia ahmedatia80 at gmail.com
Mon Dec 25 19:21:14 CET 2017

LSD-test produces error for this code;

code <- as.factor(Rotationdata_R$`Rot/code`)  #factor in the main
Nitrogen <- as.factor(Rotationdata_R$Nitrogen) #factor in the sub
Rep <- as.factor(Rotationdata_R$REP) #blocks
Year <- as.factor(Rotationdata_R$YEAR)  #years

model <- aov(Rotationdata_R$`GY(Mg/ha)`~Rep+code*as.factor(Nitrogen)+Error(Rep/Year/code),data=Rotationdata_R)


the error;

Error in as.data.frame.default(x[[i]], optional = TRUE,
stringsAsFactors = stringsAsFactors) :
  cannot coerce class "c("aovlist", "listof")" to a data.frame

What is wrong with this.

Ahmed Attia, Ph.D.
Agronomist & Soil Scientist

More information about the R-help mailing list