Skip to contents

Checks whether a certain choice complies with a provided choice_type. This helper function is called by the step template after the documentation block when choice is not NULL.

Usage

check_choice(choice, choice_type)

Arguments

choice

a list containing choices

choice_type

a list of lists characterizing valid choices. Needs to be specified by the user for each design step.

Examples

  check_choice(list("my_choice"),
    list(list(name = "achoice",
              type = "character",
              valid_values = c("my_choice", "another_choice"))))
#> NULL