
Last chance! 50% off unlimited learning
Sale ends in
Create all possible pairs of two character vectors.
all_pairs(x, y = character(0), sort = FALSE, result = "matrix")names2pairs(x, y = NULL, sort = TRUE, result = "list")
Character vectors.
Logical.
A list or a matrix.
Søren Højsgaard, sorenh@math.aau.dk
NOTICE: If y is not NULL then x and y must be disjoint (no checks are made); otherwise pairs of identical elements wil also be obtained.
x <- letters[1:4]
y <- letters[5:7]
all_pairs(x)
all_pairs(x, result="matrix")
all_pairs(x, y)
all_pairs(x, y, result="matrix")
Run the code above in your browser using DataLab