Skip to contents

Prepare a factorial design

Usage

menu_factorial(
  trt = c(random_integer_small(), random_integer_small()),
  r = random_integer_small(),
  design = c("crd", "rcbd"),
  seed = random_seed_number()
)

Arguments

trt

A vector of the number of levels for each treatment factor.

r

The number of replications for each treatment level.

design

The unit structure: "crd" or "rcbd". The default is "crd".

seed

A scalar value for computational reproducibility.

Value

A recipe for factorial design.

See also

Examples

menu_factorial(trt = c(3, 2), r = 2, design = "crd")
#> design("Factorial Design") %>%
#>   set_units(unit = 12) %>%
#>   set_trts(trt1 = 3,
#>            trt2 = 2) %>%
#>   allot_trts(~unit) %>%
#>   assign_trts("random", seed = 752) %>%
#>   serve_table()