-
Notifications
You must be signed in to change notification settings - Fork 6
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
"No visible binding for global variable" #16
Comments
It's definitely the spot where x is bare in the factory that's causing the error (or, well, somewhere else where x is used without first defining it). I think I know roughly how to fix it, I'll just have to sit down and play a little. Thanks for using the package and finding this issue! |
For now, I notice that adding the file I'm not sure that's the best solution though. |
Yeah, that "fixes" it, but I'm not sure what CRAN thinks about hacks like that. We should be able to fix it for real, I just need to try a couple things. |
There's also a hilarious little thread on StackOverflow with Hadley re: that particular workaround. :) |
Yup, that's why most of my work packages currently have a "01_fix_global_warning.R" file, but it SHOULDN'T be necessary here 😁 |
I love that I first read that as “fix global warming.” I'm like, that's an ambitious package. |
@BenjaminWolfe Do you have the call to factory handy (or can you reproduce it)? |
Let me know if this helps! First, I wrote the
Then just running
To this I added just a few changes.
With those changes, it should match exactly what I ended up putting in the package here. Everything works fine in the package, except I had to add this line of code to avoid an Here's a sample function call. If you have
|
FYI, I haven't sorted out the actual solution to this yet, BUT we do now handle dots better in {factory}! Use the new parameter I don't think I'll be able to deal with the global variable issue, unfortunately. At least not directly. I'll keep this open to add a warning or something at some point, and I'll try some things out and MAYBE find a fix, but at the moment it "feels" like it won't be fixable. |
Thank you for creating
factory
! I used it as suggested when creating mysigns
package this weekend: https://benjaminwolfe.github.io/signs/When I run
devtools::check()
on my package, I get the following warning:My package creates a function factory,
signs_format()
, that outputs a function that will take a single argument,x
. It's a pretty simple package, so if it isn't too cheeky I submit the whole thing as my reprex. The code I wrote withfactory
is here.I'm not sure whether it's balking at that precisely, or at where I use it in my roxygen2 examples...
...or at my explicit tests:
The text was updated successfully, but these errors were encountered: