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

Automate available tidiers list #69

Merged
merged 1 commit into from
Aug 13, 2015
Merged

Automate available tidiers list #69

merged 1 commit into from
Aug 13, 2015

Conversation

nutterb
Copy link
Contributor

@nutterb nutterb commented Aug 7, 2015

I'm not sure if this README.md file is where you want this, but I put in a README.Rmd file that grabs all of the classes broom can tidy, glance, and augment and sticks them in a table. It's a big table though, and maybe it would be better to stick this in a folder ignored by the build process. Then you could link to it from the main README.

This addresses Issue #66

@dgrtwo dgrtwo merged commit 7565adb into tidymodels:master Aug 13, 2015
@dgrtwo
Copy link
Collaborator

dgrtwo commented Aug 13, 2015

Great idea!

I ended up moving the whole Available Tidiers section down the page a bit, since from a marketing perspective it might distract people who still don't know what the package does :).

@briatte
Copy link
Contributor

briatte commented Aug 14, 2015

I'm not sure how the list is generated, but it has a row for NULL models, and does not list glm, for instance.

Question: how do you want to handle aliased methods?

Example: the mgcv package can estimate both gam and bam objects. As far as I can tell, the latter are just the former, but with large datasets. The results of both models are similar and should be amenable to the same tidy and glance methods.

Is it sufficient to add tidy.bam <- tidy.gam to the code and to alias the gam_tidiers documentation page with bam_tidiers?

@nutterb
Copy link
Contributor Author

nutterb commented Aug 14, 2015

The list is generated by making a data frame from methods("tidy"), methods("glance") and methods("augment"). glm is missing because I used left_join when I should have used full_join. I'll fix this when I get home tonight. Thanks for pointing my attention to that.

Believe it or not, there is a tidy.NULL method, which is why it shows up in the list. (https://github.com/dgrtwo/broom/blob/master/R/tidy.R).

For tidy.bam, it will show up in the list as long as there is a method for bam objects, even if it is as simple as

tidy.bam <- function(...){
  tidy.gam(...)
}

@briatte
Copy link
Contributor

briatte commented Aug 14, 2015

Thanks for the explanation about the README.

Aliasing is important for the project. Another example: the AER package has an ivreg function that can be tidied exactly like lm.

@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants