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

Suggestion: expand the capability to include .data$ in tidyverse pipes #9

Open
jzadra opened this issue Sep 8, 2022 · 0 comments
Open

Comments

@jzadra
Copy link

jzadra commented Sep 8, 2022

Currently doing a build check produces lots of no visible binding for global variable [x]. Many of these are bare, unquoted column names in tidyverse pipe chains (see https://www.r-bloggers.com/2019/08/no-visible-binding-for-global-variable/), for instance:

mtcars %>%
mutate(cyl = cyl *2)

This will produce a build check warning of no visible binding for global variable 'cyl'.

The solution to avoid this is:

mtcars %>%
mutate(.data$cyl = .data$cyl *2)

I realize this is a bit more difficult ot determine where to put .data$, but it would be a nice feature.

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