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

Question: Inheriting documentation from parameter with a different name #1681

Open
balthasars opened this issue Nov 20, 2024 · 0 comments
Open

Comments

@balthasars
Copy link

I really like @inheritParams and @inherit but StackOverflow seems to think roxygen2 does not support inheriting docs from parameters where the source name does not match that of the target.

I also have not seen any open or closed issues referring to this issue in this repo, so I thought I'd ask.

Say I have a documentation template

#' Commonly used parameters
#'
#' @keywords internal
#' @name params-template
#'
#' @param example_param Has a definition.
#' @param other_example_param Has a different definition.

NULL

and a function

#' @param example_param
#' @export
example_fun <- function(example_param) {
}

How can the docs for parameter example_param for example_fun() inherit the documentation from the non-matching parameter other_example_param from params-template?

Is there a solution that looks like this that I'm not aware of?

#' @inheritFrom source components param

Thank you so much in advance for your help and for your work on the package.

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