2

I have an R file with several functions in the same file.

I was trying to document them using roxygen2, but roxygen2 only allows multiple files to be documented in the same help page in a weird way. Below example shows even though the two functions are documented separately, at the output help page all the comments are put under single Description page. Ideally I would have wanted to have separate help pages for each function, but that does not seem to be possible.

Is there a better way to reorganize the output so that there are multiple Description and Usage headings in the same page for each function.

#' comment a
a  <- function()
{

}

#' comment b
#' @rdname a
b  <- function(  )
{

}

This is the output

adam
  • 655
  • 1
  • 10
  • 31
  • why are you doing `@rdname a` then – rawr Mar 04 '15 at 18:07
  • if I don't do @rdname I will not have b at help page – adam Mar 04 '15 at 21:52
  • `@rdname a` says to put the docs for `b` in the same help file with `a` – rawr Mar 04 '15 at 23:12
  • ok but w/o rdname only a is documented. I also need b to be documented – adam Mar 05 '15 at 08:58
  • that shouldn't happen. can you add the roxygen code or at least a sample from each section you added? Are you `@export`'ing these functions or just writing documentation? – rawr Mar 05 '15 at 15:31
  • I am not using the @export field, though adding it does not make a difference to above result. Documentation is not written manually. It is written by roxygen2. I added the help page in picture, take a look. All the functions that are in single file, are reported in a single help page. In addition the Description section is assembling all the function descriptions and putting on top. I want to have separate help pages for each function. – adam Mar 05 '15 at 17:19

0 Answers0