DataTables Smart Search在本地可与R Shiny一起使用,但在部署时Smart Search不再起作用

时间:2018-07-17 16:41:28

标签: r shiny dt

我有一个带有通过DT包创建的数据表的RShiny应用程序,当通过RStudio在本地托管时,它可以完美运行,但是当我通过我们的平台部署它时,智能搜索似乎无法正常工作,并且将输入作为一个短语。

ui <- fluidPage(
DT::dataTableOutput("summary")
, DT::dataTableOutput("drilldown")
)


server <- function(input, output){

# display the data that is available to be drilled down
output$summary <- DT::renderDataTable(questions_min, filter = 'top')



# subset the records to the row that was clicked
drilldata <- reactive({
shiny::validate(
  need(length(input$summary_rows_selected) > 0, "Select rows to drill down!")
)    

# subset the summary table and extract the column to subset on


selected_questions <- questions_min[as.integer(input$summary_rows_selected), 
]

result <-filter( questions, questions$project_id == 
selected_questions$project_id & questions$question_id == 
selected_questions$question_id)
result[,5:6]
})

# display the subsetted data
output$drilldown <- DT::renderDataTable(drilldata())
}

shinyApp(ui, server)

反正还能保证代码中的智能搜索功能吗?

0 个答案:

没有答案