nutterb / pixiedust

Tables So Beautifully Fine-Tuned You Will Believe It's Magic.
180 stars 18 forks source link

Turn dust into a generic method #6

Closed nutterb closed 9 years ago

nutterb commented 9 years ago

Since there is a data.frame method in broom, it would make sense to have a generic dust with default and data.frame methods. The data.frame method would need an additional tidy=FALSE argument, which would prevent the data frame summary from being calculated unless the user wanted it.

nutterb commented 9 years ago

while I'm at it, how about fixing it so that if I pass a tbl_df or data.table, it still works instead of kicking back

Warning message:
In if (!class(object) == "data.frame") object <- broom::tidy(object,  :
  the condition has length > 1 and only the first element will be used
nutterb commented 9 years ago

Having evaluated this further, I've decided against this idea as it makes it nearly impossible to retain the original object, which I may want further down the line.