View source: R/generate_all_combinations.R
generate_all_combinations | R Documentation |
Function to generate all combinations of the elements within a vector.
generate_all_combinations(x)
x |
A vector to generate all combinations of elements of. |
List, with the length of 2 ^ length(x
) - 1.
Stuart K. Grange
combn
# Get all combinations of three letters
letters <- c("s", "t", "u")
generate_all_combinations(letters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.