小编Avi*_*tri的帖子

Shiny DT::renderDataTable 的“全选”复选框

我想要一个复选框,用于选择 Shiny 中标准 DT::renderDataTable 中显示的所有行(显示是关键,因为您应用的过滤器和整个数据表之间存在差异)。

是否有任何 DT 扩展可以做到这一点?我的编码技能很基础,因此我无法编写等效的 Java 或 HTML 代码。

到目前为止,这是我的应用程序,任何 csv 文件都兼容选择所有用途。目前有一种笨拙的方法来创建所有选定行的另一个表(手动逐一选择) - 当您想要选择 30 只具有相同特征的动物时,这很困难。

library(shiny)
library(shinyjs)
library(DT)
library(dplyr)
library(data.table)



ui = pageWithSidebar(

  headerPanel(""),

  #This is where the full animal information file is input, as a ".txt" file.
  sidebarPanel(
    fileInput("ani", "Upload Animal Information File", accept = ".csv"),
    br(),
    numericInput("groups","Number of Ewe Groups", value = 1 ),
    #This is a list of the table headers. These headers can be indivdually selected to be part of the concatenated …
Run Code Online (Sandbox Code Playgroud)

r shiny dt

3
推荐指数
1
解决办法
3470
查看次数

标签 统计

dt ×1

r ×1

shiny ×1