Chapter 17 17 Big Picture

17.8 Quosures

What is meant here by “data mask”

## iris %>% dplyr::filter(Sepal.Length > 5) %>% ggplot2::ggplot() + 
##     ggplot2::aes(x = Sepal.Length, y = Sepal.Width) + ggplot2::geom_point()

Any valid r code can be converted into an expression or list of expressions, and expressions can be patched together using this unquoting (forcing) procedure.

Probably best thoguht of in terms of the tree structure, by replacing one node with another expression:

## █─`+` 
## ├─a 
## └─b
## █─`+` 
## ├─x 
## └─y
## █─`+` 
## ├─a 
## └─█─`+` 
##   ├─x 
##   └─y

so the forcing operation is kind of like performing surgery on the AST, where you cut out one node (the thing being forced) and replacing it with some other code.