1
如果用戶選擇不僅保留名詞和形容詞("pos"
selectInput設置爲FALSE
),則應提示是否應刪除停用詞("stop"
selectInput) 。R即使滿足條件,也永不出現閃亮條件面板
然而,儘管我小心翼翼地寫在JS,而不是R中的情況下,有條件的面板一直沒有出現,即使滿足條件。我很難過。
最小的可重複的例子:
shinyApp(
ui = shinyUI(fluidPage(
fluidRow(
column (2,
wellPanel(
h5("Parameters"),
tabsetPanel(
tabPanel("Text",
selectInput("pos", label = h5("Keep only nouns & adjectives?"), choices = list("Yes" = TRUE, "No" = FALSE), selected = TRUE),
conditionalPanel(
condition = "input.pos == false",
selectInput("stop", label = h5("Remove stopwords?"), choices = list("Yes" = TRUE, "No" = FALSE), selected = TRUE)
)))))))),
server = shinyServer(function(input, output) {
})
)
上帝保佑你科裏 – Antoine