There is a way to automatically generate roxygen2 @param tag for a function

Viewed 17

Currently if I want to document a function, for example the simple one below

a_func <- function(x, y, z) {

}

I have to manually type the following @param tag to annotate each of the parameters

@param x type, some description
@param y type, some description
@param z type, some description

However, when there are a lot of parameters, this approach is extremely error-prone. I could miss some parameters or use the wrong order of the parameters. So I want to ask whether there is a way to let roxgen2 to automatically generate the @param tags based on the names and the order of parameters.

0 Answers
Related