Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

var_is_a

Test that the value of the expression is of a specific class.


Description

Returns TRUE if a variable of the given name exists in the global environment and is of the given class.

Usage

var_is_a(class, var_name)

Arguments

class

expected class which the given variable

var_name

name of the variable

Value

TRUE or FALSE

See Also

Examples

## Not run: 
# Test that a variable named "x" in the global environmentis numeric.
var_is_a('numeric', 'x')

## End(Not run)

swirl

Learn R, in R

v2.4.5
MIT + file LICENSE
Authors
Sean Kross [aut, cre], Nick Carchedi [aut], Bill Bauer [aut], Gina Grdina [aut], Filip Schouwenaars [ctb], Wush Wu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.