format_quiz: Formatting and printing quizzes, questions, and answers

Description Usage Arguments See Also Examples

Description

Notes:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'tutorial_question_answer'
format(x, ..., spacing = "")

## S3 method for class 'tutorial_question'
format(x, ..., spacing = "")

## S3 method for class 'tutorial_quiz'
format(x, ...)

## S3 method for class 'tutorial_question'
print(x, ...)

## S3 method for class 'tutorial_question_answer'
print(x, ...)

## S3 method for class 'tutorial_quiz'
print(x, ...)

Arguments

x

object of interest

...

ignored

spacing

Text to be placed at the beginning of each new line

See Also

quiz, question, answer

Examples

1
2
3
4
5
6
7
8
9
ex_question <- question("What number is the letter A in the alphabet?",
  answer("8"),
  answer("14"),
  answer("1", correct = TRUE),
  answer("23"),
  incorrect = "See [here](https://en.wikipedia.org/wiki/English_alphabet) and try again.",
  allow_retry = TRUE
)
cat(format(ex_question), "\n")

PaulESantos/pftctutor documentation built on March 31, 2020, 12:56 a.m.