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

Only data decides width of a pillar, with a minimum of 5 #498

Closed
wants to merge 3 commits into from

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Jan 31, 2022

Requires #483, effectively removes effect of options(pillar.min_title_width = ) .

Do we want a new desired_width or ideal_width arg to new_pillar()? By default it would indicate the width of the data, we wouldn't need to treat the "data" component specially.

palmerpenguins::penguins
#> # A tibble: 344 × 8
#>    species island    bill_length_mm bill_depth_mm flipper_le… body… sex     year
#>    <fct>   <fct>              <dbl>         <dbl>       <int> <int> <fct>  <int>
#>  1 Adelie  Torgersen           39.1          18.7         181  3750 male    2007
#>  2 Adelie  Torgersen           39.5          17.4         186  3800 female  2007
#>  3 Adelie  Torgersen           40.3          18           195  3250 female  2007
#>  4 Adelie  Torgersen           NA            NA            NA    NA <NA>    2007
#>  5 Adelie  Torgersen           36.7          19.3         193  3450 female  2007
#>  6 Adelie  Torgersen           39.3          20.6         190  3650 male    2007
#>  7 Adelie  Torgersen           38.9          17.8         181  3625 female  2007
#>  8 Adelie  Torgersen           39.2          19.6         195  4675 male    2007
#>  9 Adelie  Torgersen           34.1          18.1         193  3475 <NA>    2007
#> 10 Adelie  Torgersen           42            20.2         190  4250 <NA>    2007
#> # … with 334 more rows

Created on 2022-01-31 by the reprex package (v2.0.1)

@hadley
Copy link
Member

hadley commented Feb 25, 2022

I'm slightly worried that this is going to be too aggressive, but I think generally you're better off seeing more columns even if some long variable names get truncated.

@krlmlr krlmlr force-pushed the f-data-decides-width branch from 68f9b71 to 8a88dba Compare April 22, 2022 19:50
@krlmlr krlmlr changed the title WIP: Only data decides width of a pillar, with a minimum of 5 Only data decides width of a pillar, with a minimum of 5 Apr 23, 2022
@krlmlr krlmlr force-pushed the f-data-decides-width branch from 18ec3dd to 183eb17 Compare April 23, 2022 14:53
@krlmlr
Copy link
Member Author

krlmlr commented May 12, 2022

Implemented by changing the default option value.

@krlmlr krlmlr closed this May 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants