Skip to content
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

Show significant but constant digits in a different color #57

Closed
krlmlr opened this issue Oct 4, 2017 · 4 comments
Closed

Show significant but constant digits in a different color #57

krlmlr opened this issue Oct 4, 2017 · 4 comments

Comments

@krlmlr
Copy link
Member

krlmlr commented Oct 4, 2017

Example: lat-lon of a local area, years, years and months in dates varying by days, strings with a common prefix, ...

Should simply look at the decimal/textual representation and check:

  1. If sign different, abort
  2. If leftmost digit different anywhere, abort
  3. Else, highlight and proceed with the next digit

How should the significant-but-constant digits be formatted?

Because this heuristic seems to be valid not only for numbers, but also dates, hms, strings, ..., maybe we need a generic helper.

Reference: tidyverse/tibble#305 (comment)

@hadley
Copy link
Member

hadley commented Jan 8, 2018

We should consider a similar algorithm for column names so that averylongcolumnname1 and averylongcolumnname2 get truncated to avery...1 and avery...2.

@AmeliaMN
Copy link

AmeliaMN commented Feb 9, 2018

+1 When I was teaching at RStudio conf, about half my "Intro to R and RStudio" class saw pillar highlighting (long story) and they were very confused about why it was 2012 when you really care about 2012 or 2012 with dates.

@krlmlr
Copy link
Member Author

krlmlr commented Feb 10, 2018

For now, subtle highlighting is turned off by default for numbers. We clearly need to look at the available literature (#99).

@krlmlr krlmlr closed this as completed Feb 10, 2018
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

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.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants