If you don't mind, I'd like your feedback on how well this satisfies your desire to separate of factor levels and handle the interactions.
The known limitations:
This only works on models that have a model.frame method. I'm not sure I want to go chasing all of this information for models that don't have a convenient way to get the data out of the model.
Clearly, the interaction between factor and numeric needs some work in the representation. I just haven't worked on it yet because I want to make sure I'm on the right path first.
When a function is passed to the formula (ie, factor(am) or wt^2, I'm not going to be able to recover the variable label. Is that something you could live with? It would mean either making sure you calculate all of your transformations before passing them to the model, or using the replace sprinkle in the post-processing with pixiedust.
@matthieugomez, @simonthelwall I've been working on some resolutions to the
broom
issue https://github.com/dgrtwo/broom/issues/16.To that effect, I have a small suite of functions in a gist (https://gist.github.com/nutterb/ef5815cb535877b68667) that if you copy into your workspace, you can run the following code:
If you don't mind, I'd like your feedback on how well this satisfies your desire to separate of factor levels and handle the interactions.
The known limitations:
model.frame
method. I'm not sure I want to go chasing all of this information for models that don't have a convenient way to get the data out of the model.factor(am)
orwt^2
, I'm not going to be able to recover the variable label. Is that something you could live with? It would mean either making sure you calculate all of your transformations before passing them to the model, or using thereplace
sprinkle in the post-processing withpixiedust
.Any thoughts?