combn2: (Fast, simple) Generate All Combinations of n Elements, Taken...

Description Usage Arguments Details Value

Description

A fast, simple version of combn.

Usage

1
  combn2(x, m, required = integer(0))

Arguments

x

The set of elements from which to choose. Unlike combn, if this is a single integer, only this single integer is used; combn uses 1:x in this case.

m

The size of the sets

required

A numeric vector that is appended to each set

Details

ALSO NOTE. The output is SORTED!

If x is of length 0, then a blank list list() is returned, unless required is of length great than 0, in which case, list(required) is returned.

Value

A list of the combinations


rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.