Displaying list columns in data frames effectively in Shiny apps?


Some of my apps are now fully invested in tidy data principles and make use of list columns in data frames to organize objects. I’d like to display some of these within my app and.some of my hacks include using DT and making a list column of character vectors just big strings delimited by commas. But that got ugly pretty fast! I use the listviewer widget by Kent Russell quite a bit in my dev work but the visuals don’t mesh well with the overall app looks. Anyone have recommendations on other widgets or techniques to use in these situations?


Hmmm, that’s a hard problem partially because list-columns are optimized for computation organization rather than human readability. Some ideas:

  • An accordion style interface where each row of the nested dataset can be clicked to reveal an individual datatable with the list-column entry
  • Allow each row of the datatable to be clicked to highlight, this would populate a separate data table output with the list-column entry
  • Provide a nest/unnest button which would allow the viewer to see the dataset in both orientations


Nice ideas @gordon! The easiest one to prototype will be the second option, since that just takes advantage of the row/cell selected by the user and doesn’t need any other major modifications other than rendering the new table. I’ll give this a try in my apps and report back :+1: