powered by
Compute all possible combinations of a vector - ignoring the empty set
powerset(x, size_start = 1)
A list of possible options
Required. Input vector
First power set input size
# All possible combinations powerset(1:4) # Now try without ignoring the single sets: powerset(1:4,2)
Run the code above in your browser using DataLab