问题:
我希望删除 Shiny 的 DT 中显示的 n 个条目字段中的 1 到 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
是表信息摘要:这是您要省略的。您还可以使用此方法删除其他元素,例如搜索框或分页控件。有关如何在 R 中执行此操作,请参阅本页第 4.2 节:https://rstudio.github.io/DT/options.html
数据表手册中的这个页面讨论了 DOM 选项:https://datatables.net/reference/option/dom
关于删除 "Showing 1 to N of N Entries" Shiny DT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51730816/