Define the possible allocation of treatments to unitsSource:
This function adds the edges between variable nodes to specify the mapping of units to treatment. This function does not actually assign specific treatment levels onto actual units.
One-sided or two-sided formula. If the input is a one-sided formula then the whole treatment is applied to the specified unit.
A logical value. This indicates whether to record this code step. The default is TRUE. It should remain TRUE unless this function is used as a wrapper in other code.
start_design() %>% set_units(block = 10, plot = nested_in(block, 3)) %>% set_trts(treat = c("A", "B", "C"), pest = c("a", "b")) %>% allot_trts(treat ~ plot, pest ~ block) #> Warning: `start_design` is deprecated. Please use `design` instead. #> An edibble design #> ├─block (10 levels) #> │ └─plot (30 levels) #> ├─treat (3 levels) #> └─pest (2 levels) #> Allotment: #> #> • treat ~ plot #> • pest ~ block