首页 > 解决方案 > 基于响应式数据框创建值框?

问题描述

我在 Shiny 中制作了一个交互式仪表板,现在我制作了一个交互式数据框,它根据输入进行过滤:

反应式数据框:

        reactiv.export <- reactive({
            req(input$selectVariable)
            export %>% filter(export$`e-mail` %in% input$selectVariable)
        })

而且我想根据该反应数据框制作一个值框,但它似乎不起作用:/

用户界面方面:

valueBoxOutput("box1")

服务器端 :

output$box1 <-renderValueBox({
        valueBox(nrow(reactiv.export), "test :",width = 3, icon = icon("list"), color = "purple")

我使用 shinydashboard 包来制作我的仪表板。

如果有人对我的问题有答案,谢谢:)

标签: rshinyshinydashboard

解决方案


推荐阅读