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

Truncated list-cols don't seem to get grey coloring #628

Closed
DavisVaughan opened this issue Feb 16, 2023 · 2 comments · Fixed by #634
Closed

Truncated list-cols don't seem to get grey coloring #628

DavisVaughan opened this issue Feb 16, 2023 · 2 comments · Fixed by #634

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Feb 16, 2023

i.e. <tibble> is white but should be grey like the other ones?

Screen Shot 2023-02-16 at 12 03 08 PM

library(tidymodels)

tidymodels_prefer()

data(ames)

ex_data <- 
 ames %>% 
 nest(data1 = c(everything()), .by = Neighborhood) %>% 
 mutate(
  data2 = data1, 
  data3 = data1,
  data4 = data1,
  data5 = data1,
 )

options(width = 111)
print(ex_data)
@krlmlr
Copy link
Member

krlmlr commented Mar 12, 2023

Simpler reprex:

options(width = 40)

pillar:::new_tbl(n = 1L, list(
  a = "name",
  b = list(data.frame()),
  c = list(data.frame()),
  d = list(data.frame())
))
#> # A data frame: 1 × 4
#>   a     b            c            d     
#>   <chr> <list>       <list>       <list>
#> 1 name  <df [0 × 0]> <df [0 × 0]> <df>

Created on 2023-03-12 with reprex v2.0.2

@krlmlr
Copy link
Member

krlmlr commented Mar 12, 2023

Even simpler:

pillar::pillar(list(data.frame()), width = 11)
#> <pillar>
#> <list>
#> <df>
pillar::pillar(list(data.frame()), width = 12)
#> <pillar>
#> <list>      
#> <df [0 × 0]>

Created on 2023-03-12 with reprex v2.0.2

@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2024
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 a pull request may close this issue.

2 participants