You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that the issue of R CMD check and the copious amounts of no visible binding for global variable [variable name] NOTES it produces has been raised in other forums (e.g., on StackOverflow: https://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when, or in the context of other packages: tidyverse/magrittr#29), but the solutions provided therein are either not satisfactory or are actually problematic to the package since the solutions themselves introduce some additional notes/warnings, especially if this is your first time developing package and you are encountering this problem for the first time.
So I was wondering if the future release of devtools can have some routines that automatically take the necessary steps to remove this particular breed of NOTES (e.g., automatically adding necessary variables via globalVariables(c(...)) or setting them to NULL, etc.) since it seems like a very common problem that people encounter and is frustrating to get rid off.
The text was updated successfully, but these errors were encountered:
utils::globalVariables() is the correct solution to the problem and doesn't introduce any additional issues.
I don't like the idea of providing a helper because there are plenty of cases where this check does catch an issue (a typo in a variable name for instance, or forgetting to include a variable as a function argument), so I think this is something a human needs to look at and verify they are really false positives.
It is possible there could be a usethis helper which would help construct the globalVariables() call for you but it would be somewhat tricky to do correctly. I think if this was anywhere it would be there rather than in devtools.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
lockbot
locked and limited conversation to collaborators
Sep 17, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I know that the issue of
R CMD check
and the copious amounts ofno visible binding for global variable [variable name]
NOTES it produces has been raised in other forums (e.g., on StackOverflow: https://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when, or in the context of other packages: tidyverse/magrittr#29), but the solutions provided therein are either not satisfactory or are actually problematic to the package since the solutions themselves introduce some additional notes/warnings, especially if this is your first time developing package and you are encountering this problem for the first time.So I was wondering if the future release of
devtools
can have some routines that automatically take the necessary steps to remove this particular breed of NOTES (e.g., automatically adding necessary variables viaglobalVariables(c(...))
or setting them toNULL
, etc.) since it seems like a very common problem that people encounter and is frustrating to get rid off.The text was updated successfully, but these errors were encountered: