GithubHelp home page GithubHelp logo

Comments (9)

hadley avatar hadley commented on July 18, 2024 4

I've changed my mind - it's causing enough pain for enough people right now that we should have someway to suppress.

Probably easiest to parameterise as option(pillar.sigfigs = 3) allowing option(pillar.sigfigs = Inf)to turn it off.

from pillar.

hadley avatar hadley commented on July 18, 2024 2

That is not under consideration right now. It needs more discussion, and we need to get a release out to resolve the biggest problems.

from pillar.

hadley avatar hadley commented on July 18, 2024

The underlying problem here is #57 - I think if we fix that an option will not be necessary.

I'd prefer to push as far as we can before introducing more options, since options substantially increase the testing complexity, and make the package behave differently for different people. If this new behaviour is too annoying, we can definitely consider options, but I'd like to give it more time (i.e. open again in 6 months time if it's still a problem and I'll be more amenable)

from pillar.

ilarischeinin avatar ilarischeinin commented on July 18, 2024

Unaware of this issue, I was actually already in the middle of implementing this kind of option for my own use. But then I came here to check if there was any discussion in more general terms about the question of left-hand-sides of numbers and significant digits vs. thousands separators.

As a little background, I was surprised at first when I saw that in e.g. 1234 the three digits with a separate color are 123 and not 234. Also, I would've thought that if 123456789 was shown in two colors, 123 and 789 would be shown in one, and 456 in the other color. That is, I thought that the two colors represented thousands separators. I was therefore confused what it actually meant, and only from the documentation learned that it represented significant digits.

Since I didn't want to use it that way, I started to implement an option so I could use options(pillar.sigfigs = Inf).

But then I got to thinking that would the thousands separator idea actually be a more useful use case for the colors than significant digits? Consistency is important, but since sigfig already means different things for the rhs (colors and rounding) and lhs (no rounding, only colors), I'm not sure if that rules out the idea.

I definitely haven't looked into this very deeply, so there might be fairly obvious factors at play that make my suggestion ridiculous. Or maybe it's just plain stupid. But since I have spent a fair amount of time staring at integers on the scale of millions (base pair numbers in the human genome), I for one see a lot of potential in this kind of representation (color formatting) of thousands separators. Use of commas, or extra characters in general, is problematic for copy&paste.

Or maybe keep significant digits behaving as it is, but include a new option for the thousands separator. That one could default to not be shown, but when set, it would override the significant digits on the lhs.

I'm happy to work on this and make a PR if it's deemed useful.

from pillar.

dpeterson71 avatar dpeterson71 commented on July 18, 2024

I agree that this has to change. The current implementation makes inspecting tibbles almost impossible for me. I LOVE the alignment along decimal points, but the forced highlight of only three digits is confusing at best. Not only is this unintuitive (as cboettig indicates), it is visually distracting
in many cases.

from pillar.

krlmlr avatar krlmlr commented on July 18, 2024

See #78 for a suggestion for visible thousand separators using a very light gray background every other three digits.

from pillar.

ilarischeinin avatar ilarischeinin commented on July 18, 2024

Thank you for the new options in #79!

However, I still think there should either be

  • a separation in how significant figures are treated on the left and right hand sides,
  • a mode that didn't force the number of significant digits to be set (like with base R), or
  • a separate option that would override the formatting of lhs's (#78).

I really like having subtle for things like column headers or how POSIXct's are displayed. So, I would prefer not to turn it off. But if I don't turn it off, I'm forced to set sigfig to some value. If it's small (like 3), numbers (or their lhs's to be exact) look funny. If it's large (like 10), there are many unnecessary zeros on the rhs's (#62 is about this, but I think the functionality discussed on that issue would be a slippery slope to go down).

screen shot 2018-01-11 at 16 15 24

from pillar.

krlmlr avatar krlmlr commented on July 18, 2024

@ilarischeinin: Happy to discuss this in a separate issue or even pull request ;-)

from pillar.

github-actions avatar github-actions commented on July 18, 2024

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.

from pillar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.