-
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
New vector classes designed for better printing? #144
Comments
Sounds like a good idea. I suspect this also helps cleaning up the formatting code. I can create a draft the next time I'll work on tibble. |
@hadley About printing How about |
NA would still be printed as is |
Regarding the overall approach: if one takes the requirements and algorithm of a overall tibble printing function from #104 (comment), then delegating the printing down to individual vectors requires a two pass approach: one to get the minimum required length of each vector (will probably do something like So either this becomes two S3 functions (one to get the min length of a vector, one to get the string representation of a vector) or the tibble print still needs to know the min length of each vector type :-/ |
I don't mind two new S3 methods |
I'd prefer |
Closing in favor of #235. |
I'd recommend closing in favour of https://github.com/hadley/colformat |
We can implement the logic in colformat, but let's leave this open as a reminder and for tibble + colformat integration. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
I wonder if some of the complexities of tibble printing could be pushed off to individual vector formatters. Truncating strings (at least on a local level) could be useful in other places, and could be pushed down to the vector level. Another useful display type would be for logicals, printing TRUEs as "*" and leaving FALSEs blank. Maybe the same principle applies to better formatting for doubles too?
I don't think this changes what tools tibble should provide, but it may influence how we think about providing them.
The text was updated successfully, but these errors were encountered: