-
Notifications
You must be signed in to change notification settings - Fork 130
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
Should tabyls always be tibbles? #301
Comments
I prefer tibbles, too, in general. Looking back at #44, the hassle of tibbles not printing all their rows was the deciding factor in moving to Now I suppose the There might be implementation wrinkles I'm not thinking of b/c all of the tabyl class and metadata info would have to be attached to a tbl, but I think it could be done. |
(also a small note, when you do the
|
I think passing a larger number into |
Well, now I'm on board with prioritizing this and saying |
I agree that this is a good idea. I"m often converting tabyls to tibbles to work with them further if it's not for immediate interactive checking or for printing in a report. I would also hope that it's a rare case for someone to be creating a tabyl with more than 50 rows; at that point it seems unlikely that they have a var that is actually a meaningful categorical var. So I think 50 makes sense. The case where it would be more would be 3-way+, in which case perhaps it would make sense to start reducing the number of printed rows per tabyl to limit the overall to 50 or 100. I think the only drawback here is what happens if I create a basic tabyl object earlier, and then I want to adorn things to it later on in my code? Without it being a tabyl object, would these functions still work without lots of recoding? Edit: Just realized we're talking about "printing". Would the object remain a tabyl, but only be printed as a tibble? If so my above drawback is moot. |
Well something simple like |
The lightest change would be for I could try rewriting the This rewriting might take more work, and could surface problems I'm not thinking of right now... but right now I feel like if a tabyl is going to look like a tibble when it prints, it should be a tibble. |
Yes, I see your points. I agree that printing something that looks different from what the object actually is is not a good idea and would be confusing. |
I'm still on board with making tabyls always be tibbles but I'm not including this in v2.2, it involves updating many many tests. |
This issue has been around for more than two years. I do not expect tabyls to always output tibbles. However, it should retain the property of the input dataframe. Removing the tibble property of a input dataframe is highly unexpected. |
Feature requests
I think it would be nice to print tabyl frames as tibbles! Especially since "janitor is a #tidyverse-oriented package."
It's a small thing, but consistency just makes the whole process smoother. In the example below, you can see how the tibble object makes it clear that
color
is an ordinal variable and removes non-significant digits frompercent
.Created on 2019-09-30 by the reprex package (v0.3.0)
Edit: Use
reprex::reprex()
for exampleThe text was updated successfully, but these errors were encountered: