0
我有2個輸入,說A和B.有一個輸入的字段取決於其它輸入
我想B的「值」字段依賴於由用戶對輸入A.值
即,我對B的建議取決於我在A中學到的東西。
以下代碼不起作用。我應該如何修復它?
shinyApp(
ui = fluidPage(
textInput("A", "Enter a string"),
textInput("B", "Enter another string", value = "Second"),
textOutput("curval")
),
server = function(input, output) {
if (input$A == "foo"){input$B$value <- "bar"}
}
)
此問題也引發here。但它沒有得到回答(儘管評論肯定有幫助)。
謝謝