Learn R Programming

rqti (version 1.0.0)

dropdown: Create YAML string for InlineChoice object (dropdown list)

Description

Create YAML string for InlineChoice object (dropdown list)

Usage

dropdown(
  choices,
  solution_index = 1,
  points = 1,
  shuffle = TRUE,
  response_identifier = NULL
)

Value

A character string mapped as yaml.

Arguments

choices

A numeric or character vector; contains values of possible answers. If you use a named vector, the names will be used as identifiers.

solution_index

An integer value, optional; the number of right answer in the choices vector. Default is 1.

points

A numeric value, optional; the number of points for this gap. Default is 1.

shuffle

A boolean, optional; is responsible to randomize the order in which the choices are initially presented to the candidate. Default is TRUE.

response_identifier

A character string, optional; an identifier for the answer.

See Also

gap_text(), gap_numeric(), mdlist()

Examples

Run this code
dropdown(c("Option A", "Option B"), response_identifier = "task_dd_list")

Run the code above in your browser using DataLab