func_of_newvar_equals: Test the result of a computation applied to a specific...

Description Usage Arguments Value See Also Examples

View source: R/answerTests2.R

Description

Tests the result of a computation such as mean(newVar) applied to a specific variable created in a previous question and saved behind the scenes as e$newVar.

Usage

1
func_of_newvar_equals(correct_expression)

Arguments

correct_expression

expression expected to be applied

Value

TRUE or FALSE

See Also

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

Examples

1
2
3
4
5
6
7
## Not run: 
# Test if user has taken the mean of a variable created
# in an earlier question.
#
func_of_newvar_equals('mean(newVar)')

## End(Not run)

swirl documentation built on Jan. 16, 2020, 5:03 p.m.