[Rd] promptFunctions() to handle multiple names

John Chambers jmc at r-project.org
Mon Apr 14 22:59:41 CEST 2008


Daniel Sabanés Bové wrote:
> Hi John,
>
> thanks for the pointer to promptAll()! Judging by the description
> of your function, it seems to be exactly the thing I've searched for.
>
> Well, this is yet another reason to be looking forward to your new book.
> (When will it be in the stores?)
According to my last mail from Springer, should be sometime in May.

John
>
> Daniel
>
>
> John Chambers schrieb:
>> Daniel,
>>
>> Check out the promptAll() function in the SoDA package on CRAN.  
>> (Because it was written as an example for my new book, it's not the 
>> fanciest imaginable, but seems to work OK.)
>>
>> John
>>
>>
>> Daniel Sabanés Bové wrote:
>> Hi all,
>>
>> I wanted to set up my first (private) R-package and wondered
>> if there was a function to prompt() for multiple aliases in one Rd-file,
>> e.g. to create something like the normal distribution manual page
>> encompassing rnorm, dnorm,...
>>
>> As I didn't find it, I modified prompt.default() and wrote a small 
>> function
>> to do this job, called "promptFunctions". It basically calls the helper
>> ".promptFunction" for every name it gets and puts together the output
>> from each function.
>>
>> It would be interesting for me if such a function already existed in R
>> or if something like "promptFunction" could be included in any future 
>> R version.
>> I think it would be used as many man pages document several functions 
>> at once,
>> and cutting and pasting the single prompt() files by hand could be 
>> boring.
>>
>> regards,
>> Daniel
>>
>> The Code:
>>
>



More information about the R-devel mailing list