Based on reading the documentation dplyr::pull and studying the examples, I get the impression that the argument varshould be "empty column name". For instance:
dplyr::pull(mtcars, cyl)
[1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4
However, I just realized that the name of the quoted column also works:
dplyr::pull(mtcars, "cyl")
[1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4
I'm just curious to know if there are differences between the two styles. In addition, are there any shortcomings in using the second option for using non-interactive use (for example, developing an R package).
In these examples, I am using version 0.7.4 of dplyr.
thank
source
share