Is it possible to group rows and add sub headings to datatables using the DT
package in R
?
The bellow example is done using a example in Javascript (https://datatables.net/examples/advanced_init/row_grouping.html).
Is it possible to group rows and add sub headings to datatables using the DT
package in R
?
The bellow example is done using a example in Javascript (https://datatables.net/examples/advanced_init/row_grouping.html).
From this question we can use RowGroup
's extension as follows
library(DT)
datatable(iris,
rownames = FALSE,
extensions = 'RowGroup',
options = list(rowGroup = list(dataSrc=c(4)),
columnDefs = list(list(visible=FALSE, targets=c(4)))
)
)
© 2022 - 2024 — McMap. All rights reserved.