combi: Create all possible pairwise combinations of n elements.

Usage Arguments Value Author(s) Examples

View source: R/combi.R

Usage

1
combi(x)

Arguments

x

A single string of elements, separated by a character (defaults to ";").

Value

The function returns a matrix with two columns and n rows, with each combination on one row. The number of rows can be determined using choose(n,2) where "n" is the number of elements in the input.

Author(s)

Joost van de Weijer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
combi("a;b;c;d;e")
combi("a,b,c,d,e",sep=",")
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x)
{
  }

vdweijer/supply documentation built on June 28, 2021, 7:45 a.m.