Vocabulary
Can think of cement()
and paste()
as being ‘mirror-images’ of each other.
paste()
- define what to quote - Evaluates argumentscement()
- define what to unquote - Quotes arguments
Quoting function similar to, but more precise than, Non-standard evaluation (NSE)
- Tidyverse functions - e.g.,
dplyr::mutate()
,tidyr::pivot_longer()
- Base functions - e.g.,
library()
,subset()
,with()
Quoting function arguments cannot be evaluated outside of function:
cement(Good, afternoon, Cohort) # No problem
#> [1] "Good afternoon Cohort"
Good # Error!
#> Error: object 'Good' not found
Non-quoting (standard) function arguments can be evaluated: