r - 数据未在 R 闪亮中显示 DT 复杂标题
问题描述
我正在尝试复制https://stackoverflow.com/a/45934505/7565465提供的答案,以使用 R Shiny 中的 DT 在数据表中显示复杂的标题。当我复制示例时,表格格式正确,但我的数据没有显示。如果我删除“容器 = 草图”,则会显示数据。我对“容器”的调用做错了什么?谢谢你。
sketch = htmltools::withTags(table(
class = 'display',
thead(
tr(
th(rowspan = 2, 'ID'),
th(colspan = 2, 'Web Site'),
th(colspan = 4, 'Number of Edges'),
th(rowspan = 8, 'Position')
),
tr(
th('URL'), th("Root URL"), th('Name'),
th('In'), th('Out'), th('Total')
)
)
))
#dat is saved as a tibble
output$nodeList <- renderDT(dat %>% select(
id, url, rooturl, name, in_degree, out_degree, total_degree, betweeness), container = sketch)
解决方案
推荐阅读
- php - CakePHP 3:表单控件不显示其默认值或值
- postgresql - 在 Postgress 中使用 Pattern 将字符串拆分为新行
- ruby-on-rails - Rails:如何在部署 Docker 容器后立即启动 PORO/job/worker?
- c# - 当前上下文中不存在名称“flashlightPos”
- r - 在面板数据集中均匀化 R 中的分组值
- javascript - 如何获取输入数组的值
- android - 为每个页面创建一个具有动态高度的 Flutter Carousel Slider
- laravel - 从关系中获取一列,Laravel
- c++ - 当 std::is_trivial_v 时 T 可以有析构函数吗
是真的? - amp-html - 放大器侧边栏不关闭