powered by
Returns TRUE if a variable of the given name exists in the global environment and is of the given class.
TRUE
var_is_a(class, var_name)
expected class which the given variable
name of the variable
TRUE or FALSE
FALSE
Other AnswerTests: AnswerTests, any_of_exprs(), 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()
AnswerTests
any_of_exprs()
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()
# NOT RUN { # Test that a variable named "x" in the global environmentis numeric. var_is_a('numeric', 'x') # }
Run the code above in your browser using DataLab