R Shiny, checkBox, tabPanel

...Hi,
I need help in adding variables checkbox within the tabPanel. I have already developed an r shiny app, in which on one of the page the data is displayed; on the basis of some filterers and keywords search box.

So,I want to include one checkbox group of variables for the uploaded file. I saw some of the solution but non of them is based on tabPanel. Is it possible to have variable checkBox with tabPanel and how to place this under UI and SERVER. Thanks

Hello,

Would you please provide us with a minimal example so we can better understand the question and help you finding the best solution. Take a look at this post for help:

Thanks for your reply.
Below is my UI and SERVER

Here, the complete code is not displayed but, with following ui and server, wanted to add checkBoxInputgroup of variable and it should take the variable values from dfcase().

Thanks

                 ui <-  tabPanel('Evidence Finder in Background Text',
                                    selectizeInput("Words1",
                                     label="Important Words - Dictionary",
                                     choices= TRUE, 
                                     multiple = TRUE,
                                     options = list(maxOptions = 20000)),
                     
                                  DT::dataTableOutput("table2")
                              )



            output$table2 <- DT::renderDataTable(server = FALSE,{

                            dfcase_bckg = as.data.frame(dfcase())

                                     DT::datatable(dfcase_bckg,
                                             rownames = FALSE,
                                             escape = TRUE,
                                             class = 'cell-border stripe',
                                               selection = "single",
                                           extensions = 'Buttons',
                                           )
   
                 }
             )

Hi,

I again had to guess what exactly it is you want, but based on the piece of code and your description I came up with this:

library(shiny)
library(DT)

ui <- fluidPage(
  tabPanel('Evidence Finder in Background Text',
           selectizeInput("Words1",
                          label="Important Words - Dictionary",
                          choices= TRUE, 
                          multiple = TRUE,
                          options = list(maxOptions = 20000)),
           
             uiOutput("dynamicCheckboxes"),
           
           DT::dataTableOutput("table2")
  )

)

server <- function(input, output, session) {
  dfcase = reactiveVal(data.frame(x = 1:10, y = LETTERS[1:10]))
  
  output$table2 <- DT::renderDataTable(server = FALSE,{
    
    dfcase_bckg = as.data.frame(dfcase())
    
    DT::datatable(dfcase_bckg,
                  rownames = FALSE,
                  escape = TRUE,
                  class = 'cell-border stripe',
                  selection = "single",
                  extensions = 'Buttons',
    )
    
  }
  )
  
  output$dynamicCheckboxes= renderUI({
    #Use dfcase()$y if you wnat to display values from within a column
    checkboxGroupInput("checkboxes2", "Make  choice", colnames(dfcase()), inline = T)
  })
}

shinyApp(ui, server)

If this is not what you are looking for, please describe in more detail what you like, and create a sample with a working dummy dataset.

Good luck,
PJ

Yes, i am looking for the same solution. Thanks for your suggestions. I tried this one but it is disabling my current settings of the RegEx functionality and disturbing data table environment. I am trying some permutation and combinations with the solution now.
But, thanks again for your help.

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