Infix Bitwise Operators {vectorbitops} | R Documentation |
Basic infix wrapper around the base::bitw_OP_ operations.
a %|% b
a %&% b
a %^% b
a %<<% n
a %>>% n
a , b |
Integer vectors. Numerics are coerced to integers. |
n |
Non-negative integer vector of values up to 31. |
An integer vector of length of the longer of the arguments, or zero if one of the arguments is zero-length. NA input makes NA output.
%|%
: A vector of pairwise ORed values.
%&%
: A vector of pairwise ANDed values.
%^%
: A vector of pairwise XORed values.
%<<%
: A vector of the values on the LHS pairwise left-shifted by the RHS value.
%>>%
: A vector of the values on the LHS pairwise right-shifted by the RHS value.
1 %|% 2
1 %&% 2
1 %^% 2
1 %<<% 2
8 %>>% 2