calculates_same_value: Test that the user's expression evaluates to a certain value.

Description Usage Arguments Value See Also Examples

View source: R/answerTests2.R

Description

Test that the value calculated by the user's expression is the same as the value calculated by the given expression.

Usage

1

Arguments

expression

An expression whose value will be compared to the value of the user's expression.

Value

TRUE or FALSE

See Also

Other AnswerTests: AnswerTests, any_of_exprs(), expr_creates_var(), expr_identical_to(), expr_is_a(), expr_uses_func(), func_of_newvar_equals(), omnitest(), val_has_length(), val_matches(), var_is_a()

Examples

1
2
3
4
5
6
## Not run: 
  # Test that a user's expression evaluates to a certain value
  #
  calculates_same_value('matrix(1:20, nrow=4, ncol=5)')

## End(Not run)

swirldev/swirl documentation built on Jan. 17, 2020, 6:28 p.m.