我想在dataTableOutput的每个页面中只看到三条记录。我已将页面长度设置为(pageLength = 3
)但它在我的表中没有显示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()
))
答案 0 :(得分:0)
尝试
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))})