expr_is_a {swirl}R Documentation

Test that the expression itself is of a specific class.

Description

Returns TRUE if e$expr is of the given class.

Usage

expr_is_a(class)

Arguments

class

expected class of the given expression

Value

TRUE or FALSE

See Also

Other AnswerTests: AnswerTests, any_of_exprs, calculates_same_value, expr_creates_var, expr_identical_to, expr_uses_func, func_of_newvar_equals, omnitest, val_has_length, val_matches, var_is_a

Examples

## Not run: 
# Test if the expression entered by a user is an assignment
#
expr_is_a('<-')

## End(Not run)

[Package swirl version 2.4.4 Index]