r-lib / generics

Common generic methods
https://generics.r-lib.org/
Other
61 stars 13 forks source link

How to replace broom with generics? #37

Closed strengejacke closed 5 years ago

strengejacke commented 5 years ago

I have a package where I use tidy() to get a clean output of both simple and mixed models. Since some models require broom and mixed models need broom.mixed, I thought I can use the generics package instead.

However, when I add generics to the dependencies and remove broom and broom.mixed, the latter two packages are not installed along with my package. What if users did not have these two packages already installed? What is the best practice to reduce dependencies and use generics, without letting the user run into errors or create confusion?