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

Add tidyversity class to model output #2

Open
WillemSleegers opened this issue May 6, 2018 · 2 comments
Open

Add tidyversity class to model output #2

WillemSleegers opened this issue May 6, 2018 · 2 comments

Comments

@WillemSleegers
Copy link

WillemSleegers commented May 6, 2018

Hello!

I really like this package (admittedly after playing around with it for a few minutes). I think a lot of the base R stats functions seem quite dated now, with sometimes non-human friendly print functions. So I really like your efforts to improve this.

Currently, I'm also working on a package that takes a tidy approach to statistical analyses in academia (https://github.com/WillemSleegers/tidystats). I think that our packages are perfectly compatible and I would like to add support for your package in mine.

tidystats takes the output of statistical analyses (like lm()), and makes the output tidy. The result is a table in which each row is a statistic and each column is a useful variable (e.g., the label for the statistic, and the statistic's value). This output can be added to a list, together with additional analyses. Finally, this list can be converted to a simple text file (made possible by the tidy format of each model's output). This list can be shared with others and used for improving the reporting of these statistics.

Much of this is made possible because the output of a statistical test returns an object with a specific class. I can then use this class to figure out which function to run that parses the output into a tidy format. Currently, tidyversity returns objects with the same class as the original stats function (e.g., tidy_regression() and lm() both return an object with class 'lm').

Would it be an idea to add a class label (e.g., 'tidy_lm') to the output? This distinguishes it from the original lm() output and would make it easy for me to add support for tidyversity in tidystats.

I gladly hear your thoughts on this.

@mkearney
Copy link
Owner

mkearney commented May 8, 2018

I really like this idea! I've delayed responding b/c I wanted a little bit clearer idea of what my vision is for tidyversity. I'm still thinking it through, but basically every direction I've considered would preserve the model object, the additional class type tidy_lm should integrate seamlessly. I'll leave this issue open until I make that commit (I'm contemplating the joining of multiple models as well, so I may be adding two additional class types), but it should be soon!

@WillemSleegers
Copy link
Author

Sounds great!

Indeed a good idea to think things through. I'm still finding myself rethinking stuff in my R package and it's best to get a good foundation right at the start.

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