Select box to filter a data set in regression plot

I have a regression plot in a shiny dashboard tab item

here's the code for that

 tabItem(tabName = "regressionanalysis", h2("Regression Analysis"),
                    # Begin first fluid row
                        # Begin first box plot
                        box(width = 12,
                                   plotOutput("plotRegression", 350),
                                   plotOutput("histogramdbis", height = 250),
                                   plotOutput("histogramciatas", height = 250),
                    ) # End fluid row
                    ),# End third tab item

It runs just fine when I launch the dashboard

here's the code for that

    output$plotRegression <- renderPlot({
        plotRegressionModel <- lm(dbis ~ ciatas, data = dbrp_data1)
        ggplot(dbrp_data1, aes(dbis, ciatas)) + geom_point() + stat_smooth(method = lm) +
            labs(title = "Regression Model", x = "dbis", y = "ciatas")

I've built select boxes in other parts of the dashboard, but what I'm trying to accomplish now is to use a select box on the regression tab and filter the data by U.S. state.

I'm trying to find a good reference/solution for this.

Also - I'm not currently using data frames. All computation is performed on the base data set.

Cheers ~!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.