Discussion:
[Roxygen-devel] Autodocumentation for S4 classes, methods and generics
Hadley Wickham
2012-09-12 16:47:08 UTC
Permalink
Hi all,

I'm starting to think more about S4 documentation, and wondered what
people thought about automatically adding:

* a list of all subclasses and superclasses to class documentation
* a picture showing the class graph to the class documentation
* a list of all methods to the generic documentation
* a list of all methods to the class documentation
* a list of "nearby" methods to method documentation

Should these be things that you have to turn on or turn off?

Hadley
--
RStudio / Rice University
http://had.co.nz/
Brian G. Peterson
2012-09-12 17:01:55 UTC
Permalink
Post by Hadley Wickham
* a picture showing the class graph to the class documentation
* a list of "nearby" methods to method documentation
I miss the old CallGraph functionality from the original roxygen, so I'd
like to hope that any graphing capability would include this , and
support S3 and Reference Classes as well as S4.
--
Brian
Hadley Wickham
2012-09-12 17:21:11 UTC
Permalink
Post by Brian G. Peterson
Post by Hadley Wickham
* a picture showing the class graph to the class documentation
* a list of "nearby" methods to method documentation
I miss the old CallGraph functionality from the original roxygen, so I'd
like to hope that any graphing capability would include this , and support
Do you have any particularly good examples where this is useful?
Post by Brian G. Peterson
S3 and Reference Classes as well as S4.
S3 is already supported - although there's no formal notion of an S3
class so there's only so much we can do.

I'm not sure what supporting reference classes would entail (esp. with
the alternative doc system built into ref classes). Do you have any
hand written Rd files you could share?

Hadley
--
RStudio / Rice University
http://had.co.nz/
Michael Lawrence
2012-09-12 17:29:52 UTC
Permalink
Post by Brian G. Peterson
Post by Brian G. Peterson
Post by Hadley Wickham
* a picture showing the class graph to the class documentation
* a list of "nearby" methods to method documentation
I miss the old CallGraph functionality from the original roxygen, so I'd
like to hope that any graphing capability would include this , and
support
Do you have any particularly good examples where this is useful?
Post by Brian G. Peterson
S3 and Reference Classes as well as S4.
S3 is already supported - although there's no formal notion of an S3
class so there's only so much we can do.
I'm not sure what supporting reference classes would entail (esp. with
the alternative doc system built into ref classes). Do you have any
hand written Rd files you could share?
Reference classes basically are S4 classes, so it would be nice to the same
basic features for both. Reference classes of course have some additional
notions, like class-based methods and fields that are potentially
encapsulated via active bindings and thus suitable for public access. Not
sure how one would rectify roxygen with the docstring feature.

Hadley
Post by Brian G. Peterson
--
RStudio / Rice University
http://had.co.nz/
_______________________________________________
Roxygen-devel mailing list
Roxygen-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20120912/f79f1cc6/attachment.html>
Hadley Wickham
2012-09-12 17:37:40 UTC
Permalink
Post by Michael Lawrence
Reference classes basically are S4 classes, so it would be nice to the same
basic features for both.
I think that should just work. I have:

setClass("R5ClassObject", contains = "S4ClassObject")

so reference classes will inherit all S4 class behaviour by default.
Post by Michael Lawrence
Reference classes of course have some additional
notions, like class-based methods and fields that are potentially
encapsulated via active bindings and thus suitable for public access. Not
sure how one would rectify roxygen with the docstring feature.
As a first pass, the class documentation could just include a list of
all methods and their docstrings.

Hadley
--
RStudio / Rice University
http://had.co.nz/
Loading...