[R] args() function does not list function prototype for locally-produced/installed R package
murdoch.duncan at gmail.com
Mon Dec 5 23:49:08 CET 2011
On 11-12-05 3:04 PM, Rick Reeves wrote:
> I have check the 'Building R Extensions' manual and can find no advice
> on this issue,
> so I am asking --
> I have created an R package consisting entirely of R source code, and
> created an installer
> using the R CMD build / R CMD check commands. The package installs
> correctly, using
> R CMD install, and the .Rd files for each function (one function per .R
> / .Rd file) are visible
> using the '?function' command. However, the 'args(function)' command
> does not list the
> function prototype; instead generating the error:
> Error in args(function) : object "function" not found.
> Question: If it is possible, what changes do I make to my package and
> install process to get
> args() to display the function prototype(s) for the functions in my
> local package?
Is the function visible (e.g., if you type the name of the function,
does it print)? I would guess not: I think you have a NAMESPACE file,
and you haven't listed this function in it.
If you don't have a NAMESPACE file, or you do have one and you list this
function, then I think you need to be more forthcoming with accurate
information. When I type args(function), I don't get the error you get,
since "function" is a reserved word:
Error: unexpected ')' in "args(function)"
More information about the R-help