DT::datatable(mtcars)
DT::datatable(mtcars, class = "cell-border stripe compact")
DT::datatable(mtcars, class = "cell-border stripe compact",
caption = "Table: Motor Trend Car Road Tests Data")
DT::datatable(mtcars, class = "cell-border stripe compact",
caption = "Table: Motor Trend Car Road Tests Data",
options = list(pageLength = 6))
DT::datatable(mtcars, class = "cell-border stripe compact",
caption = "Table: Motor Trend Car Road Tests Data",
options = list(pageLength = 6), filter = "top")
sketch = htmltools::withTags(table(
class = 'display',
thead(
tr(
th(rowspan = 2, 'Species'),
th(colspan = 2, 'Sepal'),
th(colspan = 2, 'Petal')
),
tr(
lapply(rep(c('Length', 'Width'), 2), th)
)
)
))
DT::datatable(iris[1:20, c(5, 1:4)], container = sketch, rownames = FALSE,
class = "stripe compact")