I am trying to replicate the answer provided at https://stackoverflow.com/a/45934505/7565465 for displaying complex headers in a data table using DT in R shiny. When I replicate the example, the table is formatted correctly, but my data is not displayed. If I remove "container = sketch" the data is displayed. What am I doing wrong with the call to "container?" Thank you.
sketch = htmltools::withTags(table(
class = 'display',
thead(
tr(
th(rowspan = 2, 'ID'),
th(colspan = 2, 'Web Site'),
th(colspan = 4, 'Number of Edges'),
th(rowspan = 8, 'Position')
),
tr(
th('URL'), th("Root URL"), th('Name'),
th('In'), th('Out'), th('Total')
)
)
))
#dat is saved as a tibble
output$nodeList <- renderDT(dat %>% select(
id, url, rooturl, name, in_degree, out_degree, total_degree, betweeness), container = sketch)