メモ:formulaはそのエンクロージング環境を捕捉している
とかかれているのをふと見かけてなるほどなあと思ったのでメモ。
# formulas automatically capture their enclosing environment foo <- function(x) { y <- 10 ~ x + y }
(https://github.com/hadley/rlang/blob/84a63a1a660cebff373b9db02ac37e04c934dbde/R/tidy-eval.R#L30-L34)
※rlangはlazyevalの後継のパッケージ
続きを読む