tidyverse / dplyr

dplyr: A grammar of data manipulation
https://dplyr.tidyverse.org/
Other
4.75k stars 2.12k forks source link

Review "tidy evaluation" in docs #3953

Closed hadley closed 4 years ago

hadley commented 5 years ago

Currently, filter has:

These arguments are automatically quoted and evaluated in the context of the data frame. They support unquoting and splicing. See vignette("programming") for an introduction to these concepts.

This is suboptimal because it doesn't explicitly say "tidy evaluation" anywhere, and I think we should be moving to deprecate the programming vignette in favour of https://tidyeval.tidyverse.org. For now, I think we should leave the vignette as is, but link to the in-progress book.

romainfrancois commented 5 years ago

There are a few mentions of the vignette. Should we replace all with links to the tidy eval book ? or is this case by case ?

> fs::dir_ls("R", regexp = "[rR]$") %>% 
+   map(readr::read_lines) %>% 
+   map(stringr::str_subset, "vignette..programming") %>% 
+   keep(~length(.) > 0)
$`R/colwise.R`
[1] "#'   `vignette(\"programming\")` for an introduction to these concepts." "#'   `vignette(\"programming\")` for an introduction to these concepts."

$`R/count-tally.R`
[1] "#'   `vignette(\"programming\")` for an introduction to these concepts."

$`R/funs.R`
[1] "#'  `vignette(\"programming\")` for an introduction to these concepts."

$`R/manip.r`
[1] "#'   splicing. See `vignette(\"programming\")` for an introduction to"   "#'   splicing. See `vignette(\"programming\")` for an introduction to"  
[3] "#'   splicing. See `vignette(\"programming\")` for an introduction to"   "#'   splicing. See `vignette(\"programming\")` for an introduction to"  
[5] "#'   `vignette(\"programming\")` for an introduction to these concepts." "#' argument. See `vignette(\"programming\")` for more information."     

$`R/sample.R`
[1] "#'   `vignette(\"programming\")` for an introduction to these concepts."

$`R/top-n.R`
[1] "#'   `vignette(\"programming\")` for an introduction to these concepts."
hadley commented 5 years ago

Yeah, I think they should all point to the book.

hadley commented 4 years ago

Fixed by #4684