-
Notifications
You must be signed in to change notification settings - Fork 15
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
method based reporting #41
Comments
Now that's what I call suggestion! =) @jeroenooms thanks for checking it out. This week is pretty busy both for @daroczig et moi, but surely we'll reconsider your suggestions as they seem very reasonable (as always) and very manageable too. |
Sure, I'm drowning in work myself as well, just a suggestion to keep in the back of your mind :-) |
That would be a cool feature indeed, thanks for that great suggestion @jeroenooms :) As I am quite impressed with your detailed usage case/demo (despite the fact that I did not ever want to use Will discuss details with @aL3xa starting from Monday, but if you are also interested in this stuff, pls do not hesitate to hop in. |
I started to implement this a few months ago, but stucked while thinking if this should be really Meanwhile I started to separate the
While this pkg is under heavy development and new features are added daily (like "exported" tables could be emacs-like grid tables or simple ones besides the default multiline Pandoc format), I can imagine using I would love to hear your feedback about this @jeroenooms, as I think package maintainers might write some |
I think |
Currently rapport() always assumes a dataframe, similar to e.g.
ggplot2
. It would be nice if there would also be functionality that uses method-based reporting, similar to R'splot()
andprint()
methods. There are a lot of advantages to levering R's class/method system. It will be easier to use for the user, and allow package developers to create report templates for their custom objects based on the class of the object, in the same way as they might define summary(), print() and plot() methods for their objects.I think it would not be too hard to introduce this. You would start with a generic method:
and define some basic reports for standard methods:
You would define one or more, flexible templates standard templates for the standard R classes in e.g. report.data.frame. report.list, report.matrix, etc. This way the user can do:
Additionaly, this allows package developers to include reporting templates in their packages. Hence Douglas Bates could define a function like:
So the advantage of this is not only that a user can do:
And get something nice 'out of the box' as defined by Douglas bates. If none of the attached packages are defining a report.lmer, it will natually fall back on
report.list
, that might try to do something standard. Also you can easily check the required arguments for a report for a certain class:The text was updated successfully, but these errors were encountered: