私はtabsetPanel()
を持っています。選択肢が2でcheckbox
がオンの場合、私はtabPanel()
を隠そうとします。私はそれを行うには、次のコードを試したが、動作しません。光沢のあるタブパネルを非表示
UI
shinyUI(
fluidPage(
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
fluidRow(
column(5,
radioButtons("radio", label = h5("Data uploaded"),
choices = list("Aff" = 1, "Cod" = 2,
"Ill" = 3),selected = 1)
)),
checkboxInput("checkbox", "cheb", value = F)
),
mainPanel(
tabsetPanel(
tabPanel("Plot", "plot1"),
conditionalPanel(
condition = "input.radio !=2 && input.checkbox == false",
tabPanel("Summary", "summary1")
),
tabPanel("Table", "table1")
)
)
)
)
)
サーバー
shinyServer(function(input,output,session){
})
どのように私はtabPanel()
を非表示にできますか?あなたがrenderUI()
でそれを行うことができ
この条件が満たされている場合は、非表示にします。 '' input.radio == 2 && input.checkbox == true "'が満たされています。説明は、私が思うコードと一致しません:) – BigDataScientist
[this](https://groups.google.com/d/msg/shiny-discuss/Coe8drGPJbU/5JXdisgVFAAJ) – SBista
:)のようなことを追加できます。これに代わる方法として、 'conditionalPanel()'に近いものを探します。良いアイデア。 – BigDataScientist