rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

Show string representation of list column with tibbles in paged_table like with print method

Open cderv opened this issue 1 year ago • 0 comments

From https://community.rstudio.com/t/r-markdown-inline-output-format-for-a-nested-tibble/147739

library(tibble)
df1 <- tibble(
  g = c(1, 2, 3),
  data = list(
    tibble(x = 1, y = 2),
    tibble(x = 4:5, y = 6:7),
    tibble(x = 10)
  )
)
df1
#> # A tibble: 3 × 2
#>       g data            
#>   <dbl> <list>          
#> 1     1 <tibble [1 × 2]>
#> 2     2 <tibble [2 × 2]>
#> 3     3 <tibble [1 × 1]>

In notebook mode:

image

When paged table is false :

image

Related to

  • https://github.com/rstudio/rmarkdown/issues/1822
  • https://github.com/rstudio/rmarkdown/issues/1767

cderv avatar Sep 20 '22 13:09 cderv