| expr_creates_var | R Documentation |
Tests if the e$expr creates one new variable (of correct name
if given.) If so, returns TRUE.
expr_creates_var(correctName = NULL)
correctName |
expected name of the new variable or |
TRUE or FALSE
Other AnswerTests:
AnswerTests,
any_of_exprs(),
calculates_same_value(),
expr_identical_to(),
expr_is_a(),
expr_uses_func(),
func_of_newvar_equals(),
omnitest(),
val_has_length(),
val_matches(),
var_is_a()
## Not run:
# Test if the user has entered an expression which creates
# a new variable of any name.
expr_creates_var()
#
# Test if the user has entered an expression which creates
# a variable named 'myNum'
#
expr_creates_var('myNum')
## End(Not run)