Function similar to combn but for larger vectors. To avoid allocating a big vector with all the combinations each one can be computed with this function.
Examples
# Output of all combinations
combn(LETTERS[1:5], 2)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> [1,] "A" "A" "A" "A" "B" "B" "B" "C" "C" "D"
#> [2,] "B" "C" "D" "E" "C" "D" "E" "D" "E" "E"
# Otuput of the second combination
combinadic(LETTERS[1:5], 2, 2)
#> [1] "C" "A"