Finds all unordered combinations of k elements from vector
v.
Usage
combs(v,k)
Arguments
v
Any numeric vector
k
Number of elements to choose from vector v. Integer smaller
or equal than length of v.
Value
combs(v,k) (where v has length n) creates a matrix with
n!/((n-k)! k!) (n choose k) rows
and k columns containing all possible combinations of n elements
taken k at a time.