rroxygen2rd

Inconsistent style Rd usage section


The new version of the roxygen2 package has resulted in substantial changes to my package's documentation files. For example, the "Usage" section for four functions combined in one .Rd file comes out like this:

contrast(object, ...)

## S3 method for class 'emmGrid'
contrast(
  object,
  method = "eff",
  interaction = FALSE,
  by,
  offset = NULL,
  scale = NULL,
  name = "contrast",
  options = get_emm_option("contrast"),
  type,
  adjust,
  simple,
  combine = FALSE,
  ratios = TRUE,
  ...
)

## S3 method for class 'emmGrid'
pairs(x, reverse = FALSE, ...)

## S3 method for class 'emmGrid'
coef(object, ...)

Note that the first, third, and fourth functions display their arguments in a single line, while the arguments for the second function are presented in a stacked format. This seems inconsistent. The previous version presented the second function's arguments unstacked (but of course wrapped over a couple of lines).

I would like my documentation to be consistent. If one function's usage presents arguments stacked like this, they all should. But I'd really rather none of them be stacked. How can I control how this is done?


Solution

  • You can do this by editing your DESCRIPTION file to include the following line:

    Roxygen: list(old_usage = TRUE)
    

    (See the "Default usage" section to the NEWS for version 7.0.0.)