powerset | R Documentation |
Finds the list of all subsets of a set.
powerset(set, sort = TRUE, nonempty = TRUE)
set |
A numeric or character vector. |
sort |
Logical value. If |
nonempty |
Logical value. If |
If sort == FALSE
the sets are in inverse lexicographical order.
A list of all subsets of set
.
Giovanni M. Marchetti
powerset(c("A", "B", "C"), nonempty = FALSE)
powerset(1:3, sort = FALSE, nonempty = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.