hadley / adv-r

Advanced R: a book

Home Page:http://adv-r.hadley.nz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feedback Chapter 17 and Introduction to Metaprogramming

Rengervn opened this issue · comments

Hi
"I recommend the tidy evaluation book at https://tidyeval.tidyverse.org/85": This is not a valid link and should probably be replaced by "
this.

Chapter 17.2:

It would be helpful to give a few reasons why one would like to manipulate expressions. Is this helpful for writing functions, packages and in what way?

The example following "You need a different tool to capture code passed to a function because doesn’t work:":

capture_it <- function(x) {
  [expr](https://rlang.r-lib.org/reference/nse-defuse.html)(x)
}
capture_it(a + b + c)
#> x

This example just confuses me and it would be helpful if it the reason why this is not working is explained.

Cheers
Renger