-
Notifications
You must be signed in to change notification settings - Fork 232
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
Tag suggestion: @globals #461
Comments
I think in the long-term this is likely to be fixed in other ways, so I'm hesitant to add support for the work around at this time. |
This would indeed help users importing
We're in the process (Rdatatable/data.table#3076) of trying to get packages that
@hadley any update on this or on your thinking here? |
You’re thinking that this would generate a (I was hoping that R CMD check would eventually recognise function attribute that would flag arguments as using NSE, but I don’t think there’s been any movement. It might be possible to contribute a patch to codetools — but I don’t think that would help with data table since the NSE mostly happens in a method) |
Roxygen does not (so far) generate any code, it does not write any of the files in the Also, I am not sure if roxygen simplifies this issue, frankly, unless it is possible to somehow solve it in There are various ways to solve the problem without roxygen, e.g. in your package, you can provide a function, that the users can just call, within their package, at install time, i.e. outside of their regular functions, and this function could call |
thanks for the response Gabor.
A good point. I'll leave it at that here. It would still be convenient to offer users some sort of guidance here, perhaps as part of |
@MichaelChirico for the data.table case, why not recommend that users import those symbols? (like |
Good idea... have filed Rdatatable/data.table#3903 Would you be open to adding |
Yes, definitely. |
With the increase in use of non-standard evaluation, it would be fantastic if it was possible in roxygen comments to indicate which NSE names are used in the function and have roxygen automatically compile the
globalVariables()
call into a new file. I know that often there are SE versions of the functions, that are better used in package development, but this is not always the case (data.table springs to mind).I suggest the addition of the @Globals tag with a straightforward syntax:
which would result in:
being written to
r/roxygen-globals.r
(or some other name - just a file that roxygen "owns")The text was updated successfully, but these errors were encountered: