Quantcast
Channel: Difference between Boolean operators && and & and between || and | in R - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Difference between Boolean operators && and & and between || and | in R

$
0
0

According to the R language definition, the difference between & and && (correspondingly | and ||) is that the former is vectorized while the latter is not.

According to the help text, I read the difference akin to the difference between an "And" and "AndAlso" (correspondingly "Or" and "OrElse")...Meaning:That not all evaluations if they don't have to be (i.e. A or B or C is always true if A is true, so stop evaluating if A is true)

Could someone shed light here?Also, is there an AndAlso and OrElse in R?


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>