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

Support for functions that return a populated environment #423

Closed
tomtom opened this issue Nov 2, 2015 · 1 comment
Closed

Support for functions that return a populated environment #423

tomtom opened this issue Nov 2, 2015 · 1 comment

Comments

@tomtom
Copy link

tomtom commented Nov 2, 2015

I often use this pattern:

MyClass <- function(init.args, ...) {

    myfn <- function(fn.args, ...) {
        +++
    }

    self <- environment()
    class(self) <- c("MyClass")
    invisible(self)
}

Currently roxygen doesn't provide a way to properly document these inner functions and to include their doc's in the help text of "MyClass". I have to include the help text of "myfn" in "MyClass" which is cumbersome and requires the use of rd macros like \description.

It would be great if I could use @describeIn to include a description of the argument list in the doc of "MyClass".

@hadley
Copy link
Member

hadley commented Nov 2, 2015

It's unlikely that roxygen2 will ever help with this, unless you use R6 (#388)

@hadley hadley closed this as completed Nov 2, 2015
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

2 participants