Question: what are logical operators in r?
Answer: R Logical Operators Logical operators are used to carry out Boolean operations like AND , OR etc. Operators & and | perform element-wise operation producing result having length of the longer operand. But && and || examines only the first element of the operands resulting into a single length logical vector.