Skip to content
Prev 9400 / 12125 Next

[R-pkg-devel] Possible bug in Codoc checking with R CMD Check

? Sat, 5 Aug 2023 12:26:20 -0400
<bill at denney.ws> ?????:
I think you're right. You can see the code doing the string
substitution in tools:::.parse_usage_as_much_as_possible.
Unfortunately, expressing "replace \whatever but only if the backslash
is not escaped" using regular expressions is hard; for example,
\\\whatever ought to be interpreted as an escaped backslash followed by
a non-escaped \whatever, and so on. A negative look-behind assertion
wouldn't do the right thing in this case.

Send an e-mail to R-devel at r-project.org to discuss a potential
solution, but be ready to file a problem report on R Bugzilla in order
to make sure that it's not forgotten (which takes more steps but may be
"more right"). See https://r-project.org/bugs.html for the official
instructions.

Meanwhile, I can suggest omitting the "\\ldots continued" default value
from the Rd file as a workaround. WRE is not explicit about this, but
missing default argument values currently don't count against you
during a codoc() check, which is useful if the actual expression used
to compute the default value is unwieldy.