In the UI part of shiny, I have some radio buttons, input boxes, and...
how can I show/ hide some of them together, for example, see this below code, I would like by selecting "cell type", these fields appear "select desire TF", select 1st cell type", "select 2nd cell type", and "select one condition" and the other ones disappear.
I tried to show, and hide by defining "id" for mentioned elements, but it didn't work. please see the attached image and
the code:
</>
tabPanel("Differential Analysis",
sidebarLayout(
sidebarPanel(
tags$h5("Mode"),
#Mode Section
radioButtons("mode_choice", "Choose one Mode:",
choices = c("Cell Type" = "celltype",
"Condition" = "condition"),
inline = T
),
tags$hr(),
selectizeInput("TF_query1",
"Select Desire TF:",
c( "ALL",
TF_vector),
)
,
fluidRow(
#if user selects condition, he will see two lists to select condition1 VS condition2
column(6,selectizeInput("condition1",
label = "Select 1st Condition",
choices = c("R1"),
multiple = F)) ,
column(6,selectizeInput("condition2",
label = "Select 2nd Condition",
choices = c("R2"),
multiple = F)),
),
fluidRow(
#if user selects Cell type, he will see two lists to select celltype1 VS celltype2
column(6, selectizeInput("celltype1",
label = "Select 1st Cell Type",
choices = c("CM1"),
multiple = F)),
column(6, selectizeInput("celltype2",
label = "Select 2nd Cell Type",
choices = c("CM1"),
multiple = F)),
),
tags$hr(),
#!Mode Section (opposite of first selection)
selectizeInput("general_celltype",
label = "Select one Cell Type:",
choices = c("CM1"),
multiple = F),
selectizeInput("general_condition",
label = "Select one Condition:",
choices = c("Random1"),
multiple = F),
),
</>