Description Usage Arguments Details Value
problem objects
1 2 3 4 5 6 7 8 9 10 | problem(text = "", answers = character(), solution = "", correct = 1L,
first = 0L, last = 0L, randomizable = TRUE)
## S3 method for class 'problem'
format(x, shuffle_answers = FALSE, show_solutions = FALSE,
tpl_problem = examiner_opts$tpl_problem,
tpl_answerlist = examiner_opts$tpl_answerlist, counter = Counter(),
cnt_problem_2 = NULL, cnt_problem_1 = 1L,
format_cnt_problem_1 = identity, format_cnt_problem_2 = identity,
format_cnt_problem_0 = identity, .debug = FALSE, ...)
|
text |
|
answers |
A |
correct |
Indices of answers which are correct. |
first |
Number of observations at the beginning of |
last |
Number of observations at the end of |
solution |
Text for the solution to the problem. |
randomizable |
Can the answers be shuffled? |
x |
The object |
shuffle_answers |
Shuffle answers? |
show_solutions |
Display the solutions to the answers? |
tpl_problem |
Whisker template to use when rendering the object. |
tpl_answerlist |
The template to use to render the object. |
counter |
A counter to keep track of the number of problems. |
cnt_problem_1 |
A counter for the top level |
cnt_problem_2 |
|
format_cnt_problem_0 |
A function used to format |
format_cnt_problem_1 |
A function used to format |
format_cnt_problem_2 |
A function used to format |
.debug |
Useful for debugging. Shows the data that is passed to the template. |
... |
Used by the template and passed to |
The class "problem" is a "list" with elements,
text"character". The text for the problem.
answers"answerlist". Possible answers to the problem.
solution"character". Text with discussion of the answer to problem.
randomizable"logical". Whether the answers can be shuffled.
An object of class problem.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.