set_trts {edibble}R Documentation

Set the treatment variables

Description

This function add a special class, called edbl_trt, of edibble variables.

Usage

set_trts(
  .edibble,
  ...,
  .name_repair = c("check_unique", "unique", "universal", "minimal"),
  .record = TRUE
)

Arguments

.edibble

An edibble design (edbl_design), an edibble data frame (edbl_table) or an object that contains the edibble data frame in the attribute design.

...

Either a name-value pair or a series of the names.

.name_repair

Same as the argument in tibble::tibble().

.record

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.

Value

An edibble design.

Definition of treatment

The word treatment is sometimes used to refer to one of these variables. When there are more than one treatment variables then this unfortunately confuses whether treatment refers to the variable or the combination of all treatment variables.

Treatment is the whole description of what is applied in an experiment.

See Also

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

Examples


design() %>%
  set_trts(pesticide = c("A", "B", "C"),
           dosage = c(0, 10, 20, 30, 40))


[Package edibble version 0.1.2 Index]