data <- matrix(scan(),ncol=3,byrow=TRUE) 1 1 120 1 2 207 1 3 122 1 4 128 2 1 208 2 2 188 2 3 137 2 4 128 3 1 199 3 2 181 3 3 177 3 4 160 4 1 194 4 2 164 4 3 177 4 4 142 5 1 177 5 2 155 5 3 160 5 4 157 6 1 195 6 2 175 6 3 138 6 4 179 data table443 <- data.frame(data) colnames(table443) <- c("block","treatment","y") table443$block <- as.factor(table443$block) # to make sure that block is a factor, not numeric table443$treatment <- as.factor(table443$treatment) # to make sure that treatment is a factor, not numeric rm(data) table443 summary(lm(y ~ block + treatment, data = table443)) anova(lm(y ~ block + treatment, data = table443)) par(mfrow=c(2,2)) plot(lm(y ~ block + treatment, data = table443)) par(mfrow=c(1,1)) friedman.test(y ~ treatment | block, data = table443) # Friedman rank test, syntax is y ~ treatment | blocks