Search code examples
rdocumentationroxygen2

Inherit Roxygen2 documentation for multiple arguments in R package


I'm writing an R package and want to inherit the documentation for two arguments (say x and y) from an old function (say old()) to a new function, new(). The twist is that these two arguments share the same argument description. That is, in old(), function, they were documented in a single line and separated by commas like this:

#' @param x,y Two arguments with the same description

I used the following for new() to inherit these arguments:

#' @inheritParams old

However, when I build the package, the documentation for new() lists x but not y.

Is there a way to inherit multiple arguments like these?


Solution

  • In case anyone else stumbles across this, the answer is that you cannot do this.

    This comes from the roxygen2 creator, Hadley Wickham.