funchir (version 0.2.0)

funchir-infix: 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 A.

B

idem A.

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

setdiff , union, intersect

Examples

Run this code
# NOT RUN {
  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)
# }

Run the code above in your browser using DataCamp Workspace