library(agricolae)
data(plots)
attach(plots)
model<-sp.plot(block,A,B,yield)
detach(plots)
# with aov
plots[,1]<-as.factor(plots[,1])
AOV <- aov(yield ~ block + A*B + Error(block/A),data=plots)
summary(AOV)
Run the code above in your browser using DataLab