any_of_exprs: Test that the user has entered one of several possible...

Description Usage Arguments Value See Also Examples

View source: R/answerTests2.R

Description

Returns TRUE if the expression the user has entered matches any of the expressions given (as character strings) in the argument.

Usage

1

Arguments

...

any number of expressions, as character strings

Value

TRUE or FALSE

See Also

Other AnswerTests: AnswerTests, calculates_same_value(), 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 has entered either cor(x, y) or cor(y, x)
any_of_exprs('cor(x, y)', 'cor(y, x)')

## End(Not run)

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