Displaying 1 result from an estimated 1 matches for "r77040".
Did you mean:
77040
2019 Aug 19
2
Check length of logical vector also for operands of || and &&?
Hi everyone
The following behavior (in R 3.6.1 and R-devel r77040) caught me by
surprise today:
truthy <- c(TRUE, FALSE)
falsy <- c(FALSE, TRUE, FALSE)
if (truthy) "check"
#> Warning in if (truthy) "check": the condition has length > 1 and only the
#> first element will be used
#> [1] "check"
if (falsy) "che...