Nonstandard evaluation
- Functions like
dplyr::filter
use nonstandard evaluation, and quote some of their arguments to help make code more tidy.
# `cyl` is written as a bare name--a symbol defined in the global environment
# but `cyl` only exists in the data frame "environment"
# so, `{dplyr}` quotes the argument
dplyr::filter(mtcars, cyl == 4)
- You often can detect this if the argument wouldn’t work in isolation, for example:
and