【发布时间】:2014-05-18 20:04:13
【问题描述】:
我在R Shiny 中有一个datatable,并希望有span multiple columns like below 的标题:
如何在 R Shiny 中实现这一点?
【问题讨论】:
标签: r datatables jquery-datatables shiny
我在R Shiny 中有一个datatable,并希望有span multiple columns like below 的标题:
如何在 R Shiny 中实现这一点?
【问题讨论】:
标签: r datatables jquery-datatables shiny
已经有例子http://rstudio.github.io/DT/
library(DT)
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)
)
)
))
datatable(iris[1:20, c(5, 1:4)], container = sketch, rownames = FALSE)
【讨论】:
2 Buttons
看看来自 RStudio DT (https://github.com/rstudio/DT) 的新包?在这里http://rstudio.github.io/DT/,您可以找到您需要的示例。
【讨论】: