This seems to be related to #21, but wasn't fixed when that bug was fixed. An argument with long names can have those names split with "\n" in the \usage block, and generate a "Mismatches in argument default values" warning in R CMD check.
R code
#' Compare images
#'
#' @param x,y,match,batch_size,match_defaults,info Description here
compare_images <- function(x, y, match = NULL, batch_size = 100L,
match_defaults = c(`Match` = TRUE,
`Likely match` = TRUE,
`Possible match` = FALSE,
`No match` = FALSE),
info = NULL, ...) {
NULL
}
\usage section
\usage{
compare_images(
x,
y,
match = NULL,
batch_size = 100L,
match_defaults = c(Match = TRUE, `Likely match` = TRUE, `Possible match` = FALSE, `No
match` = FALSE),
info = NULL,
...
)
}
(There is no explicit "\n" in the \usage block, but the line wraps after the "No" in No match.)
R CMD check excerpt
Codoc mismatches from documentation object 'compare_images':
compare_images
Code: function(x, y, match = NULL, batch_size = 100L, match_defaults
= c(Match = TRUE, "Likely match" = TRUE, "Possible
match" = FALSE, "No match" = FALSE), info = NULL, ...)
Docs: function(x, y, match = NULL, batch_size = 100L, match_defaults
= c(Match = TRUE, "Likely match" = TRUE, "Possible
match" = FALSE, "No\n match" = FALSE), info = NULL,
...)
Mismatches in argument default values:
Name: 'match_defaults'
Code: c(Match = TRUE, `Likely match` = TRUE, `Possible match` = FALSE,
`No match` = FALSE)
Docs: c(Match = TRUE, `Likely match` = TRUE, `Possible match` = FALSE,
`No\n match` = FALSE)
Now the newline shows up, and causes the warning.
This seems to be related to #21, but wasn't fixed when that bug was fixed. An argument with long names can have those names split with "\n" in the \usage block, and generate a "Mismatches in argument default values" warning in R CMD check.
R code
\usage section
(There is no explicit "\n" in the \usage block, but the line wraps after the "No" in
No match.)R CMD check excerpt
Now the newline shows up, and causes the warning.