R Shiny reactive subset data - ERROR object of type 'closure' is not subsettable

前端 未结 1 855
無奈伤痛
無奈伤痛 2021-01-07 07:32

I\'m trying to make a reactive data subset to avoid doing the subsetting at each stage of the analysis. However I get the error object of type \'closure\' is not sub

相关标签:
1条回答
  • 2021-01-07 08:19

    Found question was re-asked and answered at https://groups.google.com/forum/#!msg/shiny-discuss/p2eElm-XaqQ/y3vB4l3tt3EJ

    Basically, they suggested

    data_user <- reactive({ 
        df <- subset(data_all, data_all$consumername %in% input$user)
        df$date <- as.Date(data_user$date)
        df
    })
    

    Not enough rep to add a comment, and I thought this would be useful for others - it was for me.

    0 讨论(0)
提交回复
热议问题