make_pairs: Create all [un]ordered pairs from two vectors

Description Usage Arguments Value Examples

Description

Create all [un]ordered pairs from two vectors

Usage

1
2
3

Arguments

x, y

Atomic vectors to be paired off

Value

A data frame with column names "x" and "y" where every row corresponds to a pair.

Examples

1
2
3
4
5
make_ordered_pairs(1:3, 1:2)$x == c(1, 2, 3, 1, 2, 3)
make_ordered_pairs(1:3, 1:2)$y == c(1, 1, 1, 2, 2, 2)

make_unordered_pairs(1:3, 1:2)$x == c(1, 2, 3, 2, 3)
make_unordered_pairs(1:3, 1:2)$y == c(1, 1, 1, 2, 2)

cbaumbach/miscFun documentation built on May 13, 2019, 1:48 p.m.