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

Optionally use LHS of formula as name #59

Closed
hadley opened this issue Apr 8, 2016 · 2 comments
Closed

Optionally use LHS of formula as name #59

hadley opened this issue Apr 8, 2016 · 2 comments

Comments

@hadley
Copy link
Owner

hadley commented Apr 8, 2016

In order to do, e.g.

var <- "mpg"
dplyr::mutate_(mtcars, list(paste0(var, "2") ~ uq(var) * 2))

Maybe that implies we want

f_list(paste0(var, "2") ~ uq(var) * 2)

to be equivalent to

f_list(mpg2 = ~uq(var) * 2)

i.e. we iterate over a list extracting replacing the name with the evaluated LHS.

hadley added a commit that referenced this issue Apr 8, 2016
@hadley
Copy link
Owner Author

hadley commented Apr 8, 2016

Need to think through whether SE functions should use ... or list(), and if that depends on whether or not you're using NSE as well.

@hadley
Copy link
Owner Author

hadley commented Apr 11, 2016

Also need to support uq() on the RHS

@hadley hadley closed this as completed Apr 13, 2016
hadley added a commit that referenced this issue Apr 18, 2016
Add as_f_list. Closes #59.
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

1 participant