需要澄清逻辑运算符

时间:2019-04-29 11:32:13

标签: r shiny

想知道下面的代码

if((input$app != "") && (input$variable != "") && (input$variable != "All") && (input$variable1 != "") && (input$variable1 != "All") && (input$variable2 != "") && (input$variable2 != "All"))

可以写为

if((input$app != "") && (input$variable != c("","All")) && (input$variable1 != c("","All")) && (input$variable2 != c("","All")))

0 个答案:

没有答案