| unorderedPairs {RecordLinkage} | R Documentation |
Creates all unordered pairs of some objects or of the first
x natural numbers.
unorderedPairs(x)
x |
Either an arbitrary vector of literals or a natural number |
If x has length one, all unordered pairs of the first x
natural numbers are created. If x has more than one element,
all unordered pairs of the elements of x are created.
A matrix with two rows, each column holding one pair.
Andreas Borg
# create unordered pairs of {1,2,3}: {1,2},{1,3} and {2,3}
unorderedPairs(3)
# create unordered pairs of {"a","b","c"}: {"a","b"}, {"a","c"},{"b","c"}
unorderedPairs(c("a","b","c"))