问题:
我想在 Shiny DT 中移除显示“1 到 n 的 n 个条目”的字段。请参见下面的图片,其中显示了我想要移除的内容。
非常感谢任何见解。
您可以使用dom
选项来确定数据表中显示哪些元素。在调用数据表时,将命名列表选项传递给options
参数。dom
接受一个字符字符串,其中每个元素对应一个DOM元素。
# only display the table, and nothing else
datatable(head(iris), options = list(dom = 't'))
# the filtering box and the table
datatable(head(iris), options = list(dom = 'ft'))
i
是表格信息摘要:这是您想要省略的部分。您还可以使用此方法删除其他元素,例如搜索框或分页控件。options
传递info选项。 library(shiny)
library(DT)
ui <- fluidPage(
dataTableOutput('myTable')
)
server <- function(input, output, session) {
output$myTable <- renderDataTable(mtcars,
options = list(pageLength = 15, info = FALSE)
)
}
shinyApp(ui, server)