tidyeval icon indicating copy to clipboard operation
tidyeval copied to clipboard

How can we take inputs that should strictly be column names?

Open lionel- opened this issue 6 years ago • 0 comments

  • ensyms() not appropriate as the symbols will still be looked up inside the execution env of the user's wrapper, all the way up to the search path.

  • Do we need envars()? If user supplies symbols foo and bar, they get quoted as .data$foo and .data$bar. If a call is supplied, a helpful error is issued.

  • Other approach: enstrings() as a shortcut for map_chr(ensyms(...), as_string) and providing a tidyselect function to check existence of names in data frame. r-lib/tidyselect#85. The advantage of this approach is that the user can continue working with names as strings, which is sometimes needed (programmatically creating new columns etc).

lionel- avatar Sep 12 '19 08:09 lionel-