I got a problem with headers on my table on html_document. I use container to create double headers (found on random forum):
sketch = htmltools::withTags(table(
class = 'display',
thead(
tr(
th(
th(colspan = 2, "2018"),
th(colspan = 2, "2019"),
th(colspan = 2, "2020")
),
tr(
lapply(rep(c('DATE:', 'VALUE:'), 3), th)
)
)
))
)
DT::datatable(dfcompany1, width = '100%', container = sketch, options=list(scrollX=TRUE),rownames = FALSE)
And a result:
I want Years to be right between DATE and VALUE, unfortunatly the position is not correct. How can I correct this?