torf: Create a true-or-false question

View source: R/webexercises_fns.R

torfR Documentation

Create a true-or-false question

Description

Create a true-or-false question

Usage

torf(answer)

Arguments

answer

Logical value TRUE or FALSE, corresponding to the correct answer.

Details

Writes html code that creates an option box widget with TRUE or FALSE as alternatives. Call this function inline in an RMarkdown document. See the Web Exercises RMarkdown template for further examples.

Value

A character string with HTML code to generate a pull-down menu with elements TRUE and FALSE.

Examples

# True or False? 2 + 2 = 4
torf(TRUE)

# True or False? The month of April has 31 days.
torf(FALSE)

webexercises documentation built on May 31, 2023, 8:16 p.m.