Skip to contents

Create data frame for split-plot design

Usage

df.spd(trt.main, trt.sub, label, replicates)

Arguments

trt.main

an integer-valued vector specifying the treatment structure at main plot level, similar to df.crd.

trt.sub

an integer-valued vector specifying the treatment structure at sub plot level, similar to trt.main.

label

Optional. A list of character vectors specifying the names of treatment factors and factor levels. Each vector in the list represents a treatment factor, where the name of the vector specifies the name of the factor, and the values in the vector are the labels for that factor's levels. If not provided, factors and levels for one and two treatment factors are labeled as list(trt = c("1", "2", ...)) and list(facA = c("1", "2", ...), facB = c("1", "2", ...)), respectively.

replicates

the number of experimental units (main plots) per treatment of main plot factors.

Value

a data.frame with columns for main plots, main treatments, and sub-treatments