funchir-infix {funchir} | R Documentation |
Convenient Infix Operators
Description
Several infix operators which are convenient shorthand for common set operations, namely, modulation (A\B), union (AUB) and intersection (A & B).
Usage
A %\% B
A %u% B
A %^% B
Arguments
A |
A set |
B |
idem |
Value
The above are simply wrappers for the base functions setdiff
, union
, and intersect
, respectively, so output is exactly as for those functions.
See Also
Examples
set1 <- 1:5
set2 <- 4:6
set1 %\% set2 # c(1,2,3)
set1 %u% set2 # c(1,2,3,4,5,6)
set1 %^% set2 # c(4,5)
[Package funchir version 0.2.2 Index]