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

Added functionality to document R6classes using docblocks that allow … #465

Closed
wants to merge 2 commits into from

Conversation

hhoeflin
Copy link

@hhoeflin hhoeflin commented Apr 8, 2016

Wanted to make a suggestion on how to document R6 classes.

It is mostly in its basic functionality copied from how roxygen handles rc classes, but expanded from there on how the documentation works.

In each R6class-method, it still uses docstrings for documentation, like RC classes. However, instead of a single string, it also accepts several of them - i.e. a docblock as several docstrings.

Inside the docblock, @param lines are allowed that specify parameters.

In the documentation, the methods are set as follows:

Usage:
.... usage string of method ...

Description of method

If parameters were specified, this is followed by a
Parameters:
\describe-block with one \item per parameter.

It keeps the documentation for all methods together in a block and allows for more detail on how to document the parameters. usually, the documentation of each method will still be only 5 lines or so, so while it gets longer, it isn't excessively so.

@hhoeflin
Copy link
Author

hhoeflin commented Apr 8, 2016

Documentation would look something like this

trialr6.txt

and the resulting Rd file like this

Myclass-class.txt

@dselivanov
Copy link

Why this can't be merged?

@epicfarmer
Copy link

epicfarmer commented Aug 22, 2016

This commit doesn't allow for \code or other similar commands inside the doc blocks. Is there some reason its impossible to continue using the #' to denote roxygen comments?

@hadley
Copy link
Member

hadley commented Aug 29, 2016

Please discuss in #388

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

Successfully merging this pull request may close these issues.

4 participants