Display rendertable that contains list in the columns

I have a issue in rendering the table that are having lists like shown below

library(shiny)

ui <- fluidPage(
  uiOutput("red")
)

server <- function(input, output, session) {
  df <- structure(list(`Po` = list("2022-04-25"), Por = list(
    c("522", "55")), `Be` = list("2022-04-25"), 
    B = list("522")), row.names = "to_df", class = "data.frame")
  
  
  output$red <- renderUI({
    

    
    renderTable(df, 
                caption = "Las", striped = TRUE, hover = TRUE, bordered = TRUE)
  })
}

shinyApp(ui, server)

I know why this is not rendering since there is a list in the column. But can we make sure it is rendered with only 1 row Column Por should have "522", "55"

tibble(df) %>% 
rowwise() %>% 
mutate(across(where(is.list),
             ~paste0(.,collapse = ", ")))

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.