Experimental Design in R
Joanne Xiong
Data Scientist
library(agricolae)
trt <- letters[1:4]
rep <- 4
design.rcbd <- design.rcbd(trt,
r = rep,
seed = 42,
serie = 0)
design.rcbd$sketch
[,1] [,2] [,3] [,4]
[1,] "d" "c" "a" "b"
[2,] "b" "a" "d" "c"
[3,] "d" "a" "b" "c"
[4,] "a" "b" "d" "c"
with(dataset, interaction.plot(x.factor, trace.factor, response))
# example with the ToothGrowth dataset
with(ToothGrowth, interaction.plot(dose, supp, len))
Experimental Design in R