[Roxygen-devel] Doc for muliple functions

Lars Relund junk at relund.dk
Fri Feb 20 14:12:29 CET 2009


Hi 

I am using roxygen for documenting a package. Mostly it works well, however
some problems occur when I am trying to write doc for multiple functions.

Lets say that I have 2 functions in file test.R (in a package folder MDP),
that are so close related that I want to document them in one file:

----------

#' Desc goes here.
#'
#' Details goes here.
#'
#' @aliases foo bar
#' @param file The file name.
#' @author Lars Relund \email{lars@@relund.dk} #' @return Matrix or data
frame.
foo<-function(file) {
	...
}

bar<-function() {
	...
}

----------

Running roxygenize("MDP") will create Rd files foo and bar. However, I do
not want the bar.Rd generated. 

1) Would it be possible to include a parameter/option in roxygenize so that
Rd files not are generated for functions that are not documented (have no #'
above the function def)?

Currently I hack this using an unlink("MDP/man/bar.Rd") after calling
roxygenize.




Moreover, I have to hack the usage generation of the foo function by
including 

#' @usage foo(file)\cr
#'      bar()

in the foo doc. 

2) Is it possible to auto generate the \usage based on the alias in the doc,
i.e. since the doc for foo has an '@alias bar' then the function desc of bar
is also included in \usage?


Keep up the good work!


Best regards

Lars Relund Nielsen
Project scientist

UNIVERSITY OF AARHUS
Faculty of Agricultural Sciences
Dept. of Genetics and Biotechnology
Blichers Allé 20, P.O. BOX 50
DK-8830 Tjele			



More information about the Roxygen-devel mailing list