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
Writing a package is a whole lot of overhead that most R users never try. So a lot of people using create_tool_def will have a function with a roxygen documentation that is not registered as part of a package. It would be nice to be able to provide a copy pasted version of the function to create_tool_def. I would personally have thought that it would be nice to provide the function as text to the first argument, but given topic already accepts function names as strings, that might be messy (although create_tool_def could perhaps test to see if the string has any spaces in it to disambiguate between function names and definitions). Another possibility is another argument or refactor create_tool_def into two different functions, one of which takes function names and one of which takes function definitions.
The text was updated successfully, but these errors were encountered:
If the function has roxygen documentation and is in a file you have sourced, then create_tool_def(funcname) should work just fine, even if you're not writing a package. This is how I generally use it. (Or am I misunderstanding your request?)
Ah, yes, that worked. I'd just run the functions in the console to make them available in the global environment, but not actually sourced the file. Maybe it needs to be made clear in the docs how do use this with your own functions.
Writing a package is a whole lot of overhead that most R users never try. So a lot of people using
create_tool_def
will have a function with a roxygen documentation that is not registered as part of a package. It would be nice to be able to provide a copy pasted version of the function tocreate_tool_def
. I would personally have thought that it would be nice to provide the function as text to the first argument, but giventopic
already accepts function names as strings, that might be messy (althoughcreate_tool_def
could perhaps test to see if the string has any spaces in it to disambiguate between function names and definitions). Another possibility is another argument or refactorcreate_tool_def
into two different functions, one of which takes function names and one of which takes function definitions.The text was updated successfully, but these errors were encountered: