r - 如何根据用户在RShiny中的选择对齐数据表
问题描述
我目前正在开发一个闪亮的应用程序,但我遇到了数据表动态对齐的问题。使用的代码是
用户界面
shinyUI(fluidPage(
dashboardPage(
dashboardBody(
tabItems(
tabItem(tabName = "view_id",
sidebarLayout(
sidebarPanel(width = 2, checkboxGroupInput("sidebar", "People Viewer",
sidebar_content)
),
mainPanel(width=10,style ="background-color:RGB(255,255,255); border-color:RGB(255,255,255);align:left;",
wellPanel(DTOutput("tab") )
)
)
)
)
)))
服务器.R
shinyServer(function(input, output) {
output$tab <- {
renderDT(datatable(pep_view[ ,input$sidebar, drop = FALSE ], filter = 'top', extensions = 'FixedColumns',
options = list(scrollX = TRUE,scrollY = "400px" ,fixedColumns = TRUE, pageLength = 10, autoWidth = TRUE
), class = 'cell-border stripe')
)
}
})
任何人都可以解决这个问题吗?提前致谢!!
解决方案
推荐阅读
- javascript - 如何使用 Chart.js 在水平堆积条形图中添加标签
- android - 过滤后如何获取列表视图项的原始位置?
- postgresql - 无法在 h2 内存数据库上运行测试,而是在 PostgreSQL 上运行
- android - 如何从 Firebase 中的实时数据库中获取数组
- arrays - React - 使用 .map 和 .fill 用随机数填充二维数组
- arduino - Arduino if 语句始终为真
- oracle - 为什么 Oracle 在 UWP 的 .net 标准中崩溃但 winform 没有?
- c# - 如何获取元素的 x 和 y 位置,以便在 WPF C# 应用程序中将新控件放置在其附近
- c - 如何读入二进制文件并将数据存储在C中的指针处
- c# - C#:全局鼠标事件处理程序仅触发一次