check.expr: Test: Compare the expression check.expr evaluated in the...

Description Usage Arguments

Description

Test: Compare the expression check.expr evaluated in the student's environment with the solution correct.expr

Usage

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)

Arguments

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


skranz/RTutor2 documentation built on May 30, 2019, 2:01 a.m.