This function assigns specific treatment levels to actual units.

assign_trts(design, order = "random", seed = NULL, constrain = nesting(design))

## Arguments

design An edibble design which should have units, treatments and allotment defined. A character vector signifying the apportion of treatments to units. The value should be either "random", "systematic" or "systematic-random". "random" allocates the treatment randomly to units based on specified allotment with restrictions implied by unit structure. "systematic" allocates the treatment in a systematic order to units. "systematic-random" allocates the treatment in a systematic order to units but where it is not possible to divide treatments equally (as the number of units are not divisible by the number of levels of the treatment factor), then the extras are chosen randomly. A scalar value used to set the seed so that the result is reproducible. The nesting structure for units.