I have a package of functions; one function has 22 parameters (including ...
). I've recently moved a parameter from being a ...
option to being a full parameter, and noticed that even though it's described in the logical order in the function parameters list, and in the same order in the roxygen2 @params items list, when I document()
, the new item is below the ...
item at the bottom, and is itself followed by another param which I've got in the logical place too.
Example: Script looks like this:
#' @param ParameterA does something
#' @param ParameterB does something else
#' @param ... optional extras
foo <- function(ParameterA, ParameterB, ...)
Rd & help file look like this:
Arguments
Parameter A does something
... optional extras
Parameter B does something else
I know this is petty but does anyone know how to fix this? I deleted the .Rd file and redocument()
ed to no avail.
Imgur album (3 pics) of screenshots here: https://i.stack.imgur.com/VNqG7.jpg
Edit: more digging: I ran build & reload, check, and saw:
Documented arguments not in \usage in documentation object 'gbm.auto':‘tc’ ‘mapshape’.
Functions with \usage entries need to have the appropriate \alias entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
Last paragraph before "RC" here says @usage
no longer required since v3 of roxygen2 generates this automatically. But this isn't working for me any more, despite having worked in the past.