我在以下代码中获得missing value where TRUE/FALSE needed
,但我不知道为什么。
output$Strength<-renderText(
if(input$Motiv>=((input$Tempt-input$Rew)/(input$Tempt-input$Pun))){
"Strong!"
}else{
"Weak!"
}
)
Shiny App的其余部分运行得很好。
答案 0 :(得分:0)
尝试..
output$Strength<-renderText(
if(input$Motiv[1] >= ((input$Tempt[1]-input$Rew[1])/(input$Tempt[1]-input$Pun[1]))){
"Strong!"
}else{
"Weak!"
}
)