pillar icon indicating copy to clipboard operation
pillar copied to clipboard

Multi-stage output for packed data frames

Open krlmlr opened this issue 2 years ago • 0 comments

Current state

library(tibble)
tibble(a = tibble(b = 1, c = 2))
#> # A tibble: 1 × 1
#>     a$b    $c
#>   <dbl> <dbl>
#> 1     1     2

Created on 2021-12-25 by the reprex package (v2.0.1)

Desired?

library(tibble)
tibble(a = tibble(b = 1, c = 2))
#> # A tibble: 1 × 1
#>   a$      [2]
#>       b     c
#>   <dbl> <dbl>
#> 1     1     2

Created on 2021-12-25 by the reprex package (v2.0.1)

Things to consider

  • Show number of columns in the parent stage?
    • Search for sub_title <- c(title, ticked_names[[i]])
    • If too wide; also show ellipsis
    • Perhaps show column names in footer?
  • Distribute compound pillars over multiple tiers
    • Or can we agree that a packed data frame never spans multiple tiers?

krlmlr avatar Dec 25 '21 18:12 krlmlr