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
The .env pronouns currently refer to the environment of the outermost quosure:
.env
inner_quo <- local({ foo <- "foo" quo(.env$foo) }) outer_quo <- local({ foo <- "bar" quo(identity(!! inner_quo)) }) outer_quo #> <quosure: local> #> ~identity(~.env$foo) eval_tidy(outer_quo) #> [1] "bar"
I think this is incorrect because inner quosures do not own the dynamic environments of outer quosures. Furthermore, this creates inconsistencies due to quosure inlining:
inlined_quo <- local({ foo <- "bar" quo(!! inner_quo) }) eval_tidy(inlined_quo) #> [1] "foo"
It should be safe to fix this behaviour as we didn't document this pronoun in dplyr's programming vignette.
The text was updated successfully, but these errors were encountered:
Redefine .env pronoun at each quosure evaluation
cc1dae2
Closes r-lib#174
Successfully merging a pull request may close this issue.
The
.env
pronouns currently refer to the environment of the outermost quosure:I think this is incorrect because inner quosures do not own the dynamic environments of outer quosures. Furthermore, this creates inconsistencies due to quosure inlining:
It should be safe to fix this behaviour as we didn't document this pronoun in dplyr's programming vignette.
The text was updated successfully, but these errors were encountered: