You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, the defaults are already in the manual, in the Usage section. I agree that it can be nice to have them in the Arguments section as well, but I am not sure how easy that would be to implement. Probably not too bad.
this will be highly error-prone since I can change the default value (d = 2) and forget to update the documentation
Yes, R CMD check will catch discrepancies in the Usage section, though.
To me, repeating in the argument section is not terribly useful, and will require a decent amount of work because we'd need some package wide option to control the behaviour and give the user control over the precise appearance.
Is there any possibility that
roxygen2
can automatically add the default values for function arguments in the.Rd
files?For example,let's see this is the function:
In this case, I usually write something like-
But typically there are scores of such arguments with set default values and manually doing it means-
d = 2
) and forget to update the documentationIf
roxygen2
can automatically add the default values at the end of theparam
description text, that would be really neat.The text was updated successfully, but these errors were encountered: