过滤器不适用于整数和因子变量

时间:2018-08-01 12:30:31

标签: r shiny

在我的代码中,我有一个带有以下选项的表:

library(shiny)
library(DT)

ui <- fluidPage(DTOutput("table"))

server <- function(input, output){
  dt <- data.frame(A = 1:26, B = as.numeric(1:26),C = letters, D = as.factor(LETTERS))

  output$table <- renderDT(datatable(dt, filter = "top",
                                     extensions = c('FixedColumns','Scroller'),
                                     options = list(deferRender = T,
                                                    scrollY = 350,
                                                    scrollX = TRUE,
                                                    scroller = TRUE,
                                                    fixedColumns = list(leftColumns = 2, rightColumns = 1))
                                     )
  )
}

shinyApp(ui,server)

整数(A)和因子(D)过滤器不起作用 。你能帮忙吗?

0 个答案:

没有答案