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

Ability to use inherit to import contents but not overwrite #1584

Open
alisonmosky opened this issue Jan 25, 2024 · 2 comments
Open

Ability to use inherit to import contents but not overwrite #1584

alisonmosky opened this issue Jan 25, 2024 · 2 comments

Comments

@alisonmosky
Copy link

I would like to be able to essentially import the details from another function into the current function I'm documenting.

What i'm hoping for is something like

`@details
This function is a wrapper function for function_A. After retrieving the data from function_A, this function further wrangles the data....
Details for the logic flow of function_A are shown below:

`@inherit function_A details

This does not work. I either have to copy paste the details section from the other function or ONLY inherit the details from that function.

Is there any way around this? Maybe @inherit function_A details as @newsection so that you can inherit the contents but rename it?

@yurovska
Copy link

yurovska commented Oct 3, 2024

I need something similar too.

What I want is to @inherit other_function examples and add a few more lines of code there.

The following does not work:

#' @inherit other_function examples
#'
#' # Adding additional code at the end of examples inherited above
#' my_function(
#'   arg1 = "bla bla bla",
#'   arg2 = FALSE
#' )

@sckott
Copy link

sckott commented Nov 4, 2024

Same use case as @yurovska for me, would love to be able to inherit examples from another function docs and add more code as examples

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

3 participants