-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Default print() output #32
Comments
I agree we should have a better |
Hmm, what if print() just provides a useful summary of the structure? (e.g. like str() but doesn’t have to look like str() output) |
Yes this is something I would like as well.
Jonah Gabry <[email protected]> schrieb am Fr., 1. Nov. 2019, 20:04:
… Hmm, what if print() just provides a useful summary of the structure?
(e.g. like str() but doesn’t have to look like str() output)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#32>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2ADGKRZYM6G6RQD4TVLQRR4VLANCNFSM4JHTEMIA>
.
|
Good idea. What about something like this:
Where the first line will give the basic structure according to the specific format, but the remaining lines would be the same structure for all formats. Could either keep listing variables at the end or truncate it to the first k (10?) with an option not to truncate. That might also save us from needing to pre-compute summaries and keep them around. I have some formatting code I have been playing with while experimenting with rv-like interfaces that can output the last line, so I'd be happy to write this if we want it. |
I would very much like such a light-weight print method! |
Hmm, now that I've tried implementing something like this, I've realized it becomes a bit annoying in other ways: because it masks the default So perhaps we should leave |
This is fine with me as well. I like how tibble prints out stuff that is
truncated a lot but still gives us a lot of helpful detail. Not sure how
reasonable and doable such a print method would be for the other formats
though.
Matthew Kay <[email protected]> schrieb am Sa., 2. Nov. 2019, 23:17:
… Hmm, now that I've tried implementing something like this, I've realized
it becomes a bit annoying in other ways: because it masks the default
print output of the underlying format, if you want to get a sense of what
the draws format looks like in the specific format you are using it is
harder.
So perhaps we should leave print alone?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#32>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AECUGJYDXYA62AVAA3QRX36JANCNFSM4JHTEMIA>
.
|
It’s definitely trickier but I think worth thinking about at some point. Default print for arrays isn’t super helpful in my experience, so I’d love to have something nicer if possible! |
Seems reasonable. The approach I was taking (with mean+/-sd) is fine for the |
I meant to also say though that it's fine by me if you want to leave |
I have now added some print methods that mostly truncate the output and give additional meta-information but make sure the underlying format is still visible. I would be happy to hear your thoughts. |
@paul-buerkner asked me to check the print statements so I think I print them here for ease of discussion:
This results in:
I think these print methods are really nice. I only have two - very minor - suggestions. Suggestions
|
Thank you for your comments!
They are limited by default in a format dependent manner, which can be set globally via the For example,
I agree but have two concerns. First, this may not be trivial to implement. I know Second, I currently control the number of variables, iterations, chains, etc. shown via format specific defaults and the option to set defaults globally via |
Yes. I agree that it is not trivial, and - at least to me - it is more of a nice to have than anything important. Regarding how many chains to print - I actually think that print should show the minimal possible so I agree that 2 chains is probably a good idea as default. |
I am going to close this issue for now since we have reasonable print outputs to start with. If, at a later stage, we want to make things prettier, for instance, more adaptive to the console width, we can open a specific new issue dedicated to that purpose. |
As I've been writing
rename_variables()
I've found it's a little awkward to work with draws objects when the defaultprint
output at the console is typically gigantic. This also makes examples a little verbose, as it feels necessary to callsummarise_draws()
constantly.Two thoughts:
print()
for draws objects callsummarise_draws()
?print
,summary
, andsummarise_draws
). That possibly feels a bit overkill? I can see how they are typically used in different ways, so having them all as aliases is probably fine, but it is worth considering.The text was updated successfully, but these errors were encountered: