Create a data frame for Crossover design
df.cod(treatments, label, squares)a data.frame representing the data structure of the design
An integer vector where each element represents the number of levels
of the corresponding treatment factor. A single integer (e.g., treatments = n)
specifies one treatment factor with n levels. When multiple factors are provided,
they are arranged in a factorial treatment factor design. For example,
treatments = c(2, 3) creates a 2x3 factorial design with the first factor having 2 levels
and the second factor having 3 levels.
Optional. A list of character vectors, each corresponding to a treatment factor.
The name of each vector specifies the factor's name, and its elements provide the labels for that factor's levels.
If no labels are provided, default labels will be used. For a single treatment factor, the default is
list(trt = c("1", "2", ...)), and for two treatment factors, the default is
list(facA = c("1", "2", ...), facB = c("1", "2", ...)).
For split-plot designs, the defaults are similar but include the ".main" and ".sub" suffixes for main plot and subplot factors.
For example:
list(trt.main = c("1", "2", ...), trt.sub = c("1", "2", ...)) and
list(facA.main = c("1", "2", ...), facB.main = c("1", "2", ...),
facA.sub = c("1", "2", ...), facB.sub = c("1", "2", ...)).
Label sets should be arranged so that the main plot factors come first, followed by the subplot factors.
The number of replicated squares. By default, 1, i.e., no replicated squares.