我想使用conditionPanel,只有在前面的textInput已完成(它的初始值爲「」)時纔會出現。正確地在conditionalPanel中定義條件的正確方法是什麼?這裏是一個可重複的代碼:R shiny:條件面板條件基於textInput(如何)
ui <- pageWithSidebar(
headerPanel("TEST"),
sidebarPanel(
textInput('test', "","")),
mainPanel(
conditionalPanel(condition = "input.test != "" ", #problem is here. I've tried many possibilities (such as input.test > 0) but none have worked
helpText("abc"))
)
)
server <- function(input,output){
}
runApp(list(ui=ui,server=server))
任何意見/建議將不勝感激!
乾杯
更改爲'條件'或' 「input.test.length> 0」 ' –
非常感謝傑克! (我不是太遠,但它仍然是一個很好的學習點) – user1431694
我添加了它作爲一個答案,更多的解釋。 –