[Rd] generate Rd file from R file

Philippe Grosjean phgrosjean at sciviews.org
Tue Jan 24 11:55:12 CET 2006


Hi,
There is something like that (not so sophiscticated) defined in the 
green book, but it is not implemented in R. You should look at the 
mvbutils package, ?dochelp, ?flatdoc, ?doc3Rd, to get such features.
Best,

Philippe Grosjean


Romain Francois wrote:
> Hi,
> 
> Is there something similar to javadoc or doxygen for R, ie ability to 
> create a first draft of an Rd file reading the comments that are in a 
> script file?
> 
> For example, for the weighted.mean function in base, one could write the 
> source as :
> 
> weighted.mean <- function(
> x,             #@ a numeric vector containing the values whose mean is to be computed. 
> w,             #@ a vector of weights the same length as |x| giving the weights to use for each element of |x|.
> na.rm = FALSE  #@ a logical value indicating whether |NA |values in |x| should be stripped before the computation proceeds.
> )
> #e wt <- c(5,  5,  4,  1)/15
> #e x <- c(3.7,3.3,3.5,2.8)
> #e xm <- weighted.mean(x,wt)
> 
> 
> and get a draft file more full than what may be created with prompt.
> Of course, I do not ask for a way to not write all the information in 
> one file ... but some can be shared between R and Rd
> 
> Romain
> 
> 
>



More information about the R-devel mailing list