Insert popify for radiobuttons options

I did a popify for my radiobutton. However I would like to separate the popify in my radiobuttom options. For example, for "filter1", I would like to insert a popify for the "First option" and other popify for "Second option". Is this possible ?? The executable code is below.

library(shinyBS)
library(shiny)

ui <- fluidPage(


  titlePanel("Old Faithful Geyser Data"),

  sidebarLayout(
    sidebarPanel(


      popify(  
        radioButtons("filter1", h3("Select options"),
                     choices = list("First option" = 1, 
                                    "Second option" = 2),
                     selected = 1),
        title= "Select Proprierties",
        content = paste0("Filter 1 refers to.....")),

        radioButtons("filter2", h3("Select farms"),
                     choices = list("All farms" = 1, 
                                    "Exclude farms" = 2),
                     selected = 1),
       sliderInput("bins",
                    "Number of bins:",
                    min = 1,
                    max = 20,
                    value = 30)
           ),

    mainPanel(
      plotOutput("distPlot")
    )
  )
)

server <- function(input, output) {

  output$distPlot <- renderPlot({
    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
  })
}

# Run the application 
shinyApp(ui = ui, server = server)

Thank you very much!

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