Skip to contents

Create All Possible Combinations of Vector Elements with Minimum A and Maximum B.

Usage

combn_upto(
  vec = c("a", "b", "c", "d", "e", "f", "g"),
  n_min = 6L,
  n_max = length(vec)
)

Arguments

vec

Vector

n_min

Minimum number of elements

n_max

Maximum number of elements. Defaults to length of vec.

Value

A data frame

Examples

combn_upto()
#> $`c("a", "b", "c", "d", "e", "f", "g")`
#> [1] "a" "b" "c" "d" "e" "f" "g"
#> 
#> $`c("b", "c", "d", "e", "f", "g")`
#> [1] "b" "c" "d" "e" "f" "g"
#> 
#> $`c("a", "c", "d", "e", "f", "g")`
#> [1] "a" "c" "d" "e" "f" "g"
#> 
#> $`c("a", "b", "d", "e", "f", "g")`
#> [1] "a" "b" "d" "e" "f" "g"
#> 
#> $`c("a", "b", "c", "e", "f", "g")`
#> [1] "a" "b" "c" "e" "f" "g"
#> 
#> $`c("a", "b", "c", "d", "f", "g")`
#> [1] "a" "b" "c" "d" "f" "g"
#> 
#> $`c("a", "b", "c", "d", "e", "g")`
#> [1] "a" "b" "c" "d" "e" "g"
#> 
#> $`c("a", "b", "c", "d", "e", "f")`
#> [1] "a" "b" "c" "d" "e" "f"
#>