如何在闪亮的应用程序中自定义 dataTableOutput
how customize the dataTableOutput in shiny app
我只想在我的 dataTableOutput 的每一页中看到三个记录。我已将页面长度设置为 (pageLength = 3
),但它在我的 table 中没有显示 3 行。
代码如下:
server.r :
# display table
output$responses <- DT::renderDataTable({
(options = list(pageLength = 3))
#update after submit is clicked
input$submit
#update after delete is clicked
input$delete
ReadData()
}
ui.r :
box(
title = "KPIs", status = "primary", solidHeader = TRUE,
collapsible = TRUE,
DT::dataTableOutput("responses"), tags$hr()
))
尝试
output$responses <- DT::renderDataTable({
#update after submit is clicked
input$submit
#update after delete is clicked
input$delete
DT::datatable(ReadData(), options = list(pageLength=3))})
我只想在我的 dataTableOutput 的每一页中看到三个记录。我已将页面长度设置为 (pageLength = 3
),但它在我的 table 中没有显示 3 行。
代码如下:
server.r :
# display table
output$responses <- DT::renderDataTable({
(options = list(pageLength = 3))
#update after submit is clicked
input$submit
#update after delete is clicked
input$delete
ReadData()
}
ui.r :
box(
title = "KPIs", status = "primary", solidHeader = TRUE,
collapsible = TRUE,
DT::dataTableOutput("responses"), tags$hr()
))
尝试
output$responses <- DT::renderDataTable({
#update after submit is clicked
input$submit
#update after delete is clicked
input$delete
DT::datatable(ReadData(), options = list(pageLength=3))})