the condition has length > 1 and only the first element will be used

Published by onesixx on

Warning in …. :
the condition has length > 1 and only the first element will be used

comparing  a vector with a scalar
=> R automatically takes the first element of var

var = c("A","B","C","D")

if (var %in% c("B", "C")) {...}
if (var == "D")) {...}
Categories: R-Shiny

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x