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

expr_creates_var

Test that a new variable has been created.


Description

Tests if the e$expr creates one new variable (of correct name if given.) If so, returns TRUE.

Usage

expr_creates_var(correctName = NULL)

Arguments

correctName

expected name of the new variable or NULL

Value

TRUE or FALSE

See Also

Examples

## 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)

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.