Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for multiple inheritParams, and/or allowing space-separated entries #1677

Open
MichaelChirico opened this issue Nov 11, 2024 · 0 comments

Comments

@MichaelChirico
Copy link
Contributor

Sometimes a function can be passing some parameters directly to foo(), others directly to bar(). Naturally to avoid repetition, we want to @inheritParams from both of them (assuming there's no conflict, etc):

#' @inheritParams foo
#' @inheritParams bar
baz <- function(<foo params>, <bar params>, ...) {
}

Unfortunately, my first instinct was to try @inheritParams foo bar which seems like a natural choice given how many other @ tags in {roxygen2} work similarly:

@inherits failed in topic "baz".
✖ Can't find topic "foo bar".

If there's a reason not to allow multiple space-separated topics here, then we should just document this. I looked at vignettes("reuse") and didn't see this case discussed.

If we should just allow space-separated entries, probably the case should still be discussed in vignettes("reuse").

I can try my hand at a PR; filing an issue first for the design guidance before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant