powered by
Produces the power set of a vector.
powerSet(x, rev = FALSE)
vector of elements (the set).
logical indicating whether to reverse the order of subsets.
A list of vectors of the same type as x.
x
With rev = FALSE (the defualt) the list is ordered such that all subsets containing the last element of x come after those which do not, and so on.
rev = FALSE
Creates a list containing every subset of the elements of the vector x.
powerSetMat.
powerSetMat
# NOT RUN { powerSet(1:3) powerSet(letters[3:5], rev=TRUE) # }
Run the code above in your browser using DataLab