[Rd] How to put indentation in Rd documentation?
Dear all, can somebody please guide me on, if I want to put some **indentation** in my .Rd documentation then, what is the correct syntax? I have tried with \tab but with that the corresponding HTML help paged is not openning, saying can not recognize \tab. Thanks for your help. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Default values in control list of function
In building a function for a package, I'd like to set the defaults in a control list, e.g., makeg-function(parameters, eps = 1.0e-7, control=list(showwork=TRUE, rubbish=1.0e+101)){ etc. } This does not provide showwork or rubbish within the function if control() is not fully specified. Copying others, I've previously set the control defaults within the function then matched names, and that certainly works. I'm happy to keep using that approach, but would like to have a pointer to good practice for doing this (I'm prepared to write or help write a short tutorial if none exists). I can understand that trying to do the default replacement at a second or greater level could give problems. A search through the language definition and some googling didn't show up any obvious warning about this, but I'm sure there are some comments somewhere. Can anyone suggest some URLs? One gets used to the nicety of being able to specify defaults and forgets that even R has some limits. JN __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Default values in control list of function
On Sat, Jun 25, 2011 at 9:21 PM, Prof. John C Nash nas...@uottawa.ca wrote: In building a function for a package, I'd like to set the defaults in a control list, e.g., makeg-function(parameters, eps = 1.0e-7, control=list(showwork=TRUE, rubbish=1.0e+101)){ etc. } This does not provide showwork or rubbish within the function if control() is not fully specified. Copying others, I've previously set the control defaults within the function then matched names, and that certainly works. I'm happy to keep using that approach, but would like to have a pointer to good practice for doing this (I'm prepared to write or help write a short tutorial if none exists). I can understand that trying to do the default replacement at a second or greater level could give problems. A search through the language definition and some googling didn't show up any obvious warning about this, but I'm sure there are some comments somewhere. Can anyone suggest some URLs? One gets used to the nicety of being able to specify defaults and forgets that even R has some limits. See ?modifyList -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel