Senso <- read.table("https://husson.github.io/livre_exo/chap11_ex6.csv", header = TRUE, sep=";", encoding = "latin1") for (i in 1:2) Senso[,i] <- as.factor(Senso[,i]) library(FactoMineR) AovSum(Note ~ Jour + Chocolat + Chocolat:Jour, data = Senso) AovSum(Note ~ Jour + Chocolat, data = Senso) by(Senso[,"Note"],Senso[,"Chocolat"],mean)