Closed zeileis closed 7 months ago
Sounds good to me! I don't have the capacity to make this change myself but I fully support it.
OK, great. This just needs two mini changes in the format()
methods (plus updating the tests accordingly). It's in the devel branch now: https://github.com/alexpghayes/distributions3/pull/100/commits/625801897214a67d89672a6e40f943dec84d8f17
Now merged into main
.
Alex @alexpghayes, when printing distribution objects, the output takes up quite a bit of space (especially for vectors of distributions). Even for a 1-parameter distribution like this:
This could be alleviated if we omitted the
distribution
in the output like this:My feeling is that this easier to read and also closer to the notation used in many textbooks. It's also closer to how we create the objects in
distributions3
, e.g., we might do:Would you consider simplifying the
print()
output like this? If so, I'm happy to make the change myself, but I wanted to discuss it first before proposing a PR. In any case, the code change is quite minimal, essentially just here: https://github.com/alexpghayes/distributions3/blob/main/R/utils.R#L288