Skip to content

let fill() handle data with a .direction column #1319

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

Merged
merged 4 commits into from
Feb 15, 2022

Conversation

tjmahr
Copy link
Contributor

@tjmahr tjmahr commented Feb 9, 2022

My data had a column named .direction so there was an environment-vs-data-mask ambiguity that caused fill() to fail. I added !! to force evaluation of the .direction argument.

@tjmahr
Copy link
Contributor Author

tjmahr commented Feb 9, 2022

switching from !! .direction to .env$.direction based on the rlang docs

Note that in most cases you don't need injection with !!. For instance, the .data and .env pronouns provide more intuitive alternatives to injecting a column name and injecting a value.

@DavisVaughan DavisVaughan merged commit c8d87e0 into tidyverse:main Feb 15, 2022
@DavisVaughan
Copy link
Member

Thanks!

@tjmahr tjmahr deleted the patch-1 branch February 15, 2022 15:22
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

Successfully merging this pull request may close these issues.

2 participants