What does the operator ||
do in R?
a) Logical OR with element-wise comparison
b) Logical AND
c) Logical OR with short-circuiting
d) Logical XOR
Answer:
c) Logical OR with short-circuiting
Explanation:
The ||
operator is a logical OR operator in R with short-circuiting, meaning it evaluates only the first element of the condition.