Reputation: 31
I am using DT 0.28 and when I specify the caption argument:
DT::datatable (
gps$summary[], extension = "Buttons",
caption = tagList(h1("Caption")),
options = list(
autoWidth = TRUE, buttons = c('csv', 'excel'), dom = 'Bfrtip',
pagingType = "full_numbers", processing = TRUE, scrollX = TRUE,
stateSave = TRUE),
selection = list(mode = current_table_selection(), selected = 1, target = 'row'))
})
it appears not above the column headers as shown in example here (in section 2.7) but instead the caption is showing up between my column headers and the table data rows!
Does anyone know what the problem is?
Upvotes: 1
Views: 102
Reputation: 84679
Strange! This works like this:
datatable(iris, caption = HTML("<h1>hello</h1>"))
Upvotes: 0