Skip to contents

This function adds the edges between factor nodes to describe the high-level relationship between factors. This function does not actually assign edges between level nodes.


allot_trts(.edibble = NULL, ..., .record = TRUE)



An edibble design which should have units, treatments and allotment defined.


One-sided or two-sided formula. If the input is a one-sided formula then the whole treatment is applied to the specified unit.


Whether to record the step.


Return an edibble design.

See also


Other user-facing functions: allot_units(), design(), expect_rcrds(), export_design(), serve_table(), set_rcrds(), set_trts(), set_units()


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)
#> An edibble design
#> ├─block (10 levels)
#> │ └─plot (30 levels)
#> │   └─treat (3 levels)
#> └─pest (2 levels)