Test: Compare the expression check.expr evaluated in the student's environment with the solution correct.expr
1 2 3 4 5 6 7 | check.expr(check.expr, correct.expr,
failure.message = "{{check_expr}} has the wrong values!",
success.message = "Great, {{check_expr}} seems correct.", part = NULL,
ps = get.ps(), stud.env = ps$stud.env, verbose = FALSE,
unsubst.check.expr = NULL, unsubst.correct.expr = NULL,
str.check.expr = NULL, str.correct.expr = NULL,
tol = .Machine$double.eps^0.5)
|
check.expr |
the expression to be checked |
correct.expr |
the correct expression |
vars |
a variable name or vector of variable names |
exists |
shall existence be checked (similar length, class, values) |
failure.exists |
a message that is shown if the variable does not exists (similar the other failure.??? variables) |
failure.message.add |
a text that will be added to all failure messages |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.