Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vars_pull() is too flexible with var expressions #251

Closed
DavisVaughan opened this issue Nov 8, 2021 · 2 comments
Closed

vars_pull() is too flexible with var expressions #251

DavisVaughan opened this issue Nov 8, 2021 · 2 comments

Comments

@DavisVaughan
Copy link
Member

library(tidyselect)
library(rlang)

expr <- quo(
  unlist(.data$athlete.id, use.names=FALSE)
)

vars_pull(
  vars = "athlete.id", 
  var = !!expr
)
#> [1] "athlete.id"

Usage of vars_pull() like this was seen in the wild in another package

@DavisVaughan DavisVaughan changed the title vars_pull() it too flexible with var expressions vars_pull() is too flexible with var expressions Nov 8, 2021
@DavisVaughan
Copy link
Member Author

library(tidyselect)
library(rlang)

vars_pull(names(mtcars), cyl + cyl)
#> [1] "hp"

Created on 2021-12-14 by the reprex package (v2.0.1)

https://twitter.com/michael_chirico/status/1470656648783937537?s=20

@lionel- lionel- mentioned this issue Mar 3, 2022
@lionel-
Copy link
Member

lionel- commented Mar 3, 2022

It's probably too late to change this in vars_pull(). Let's track this in eval_pull().

@lionel- lionel- closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants