Re: [R] args() function does not list function prototype for locally-produced/installed R package

2011-12-07 Thread Rick Reeves

Duncan:
 Indeed, adding the function names to the  NAMESPACE file (in the form: 
export(functionName))  solved the problem,

and the args() function displays the function argument lists.
Thanks,
Rick Reeves
On 12/5/2011 2:49 PM, Duncan Murdoch wrote:

On 11-12-05 3:04 PM, Rick Reeves wrote:
 Greetings:

 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:


 args(function)
Error: unexpected ')' in args(function)

Duncan Murdoch

Duncan Murdoch

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] args() function does not list function prototype for locally-produced/installed R package

2011-12-05 Thread Rick Reeves

Greetings:

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?



Thanks,
Rick Reeves

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.