Arguments on new lines in R package documentation

Perhaps best asking by example, how can I get my package's Usage documentation to look like ?dplyr::mutate (with its separate lines per argument) vs. ?stats::filter?

The Usage sections:

## S3 method for class 'data.frame'
mutate(
  .data,
  ...,
  .by = NULL,
  .keep = c("all", "used", "unused", "none"),
  .before = NULL,
  .after = NULL
)

vs

filter(x, filter, method = c("convolution", "recursive"),
       sides = 2, circular = FALSE, init)

There is a lot more roxygen2 used in dplyr/R/mutate.R at main · tidyverse/dplyr (github.com) than in r-source/src/library/stats/R/filter.R at master · SurajGupta/r-source (github.com)

Is that what you're referring to?

Thanks for the question. See edit above.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.