############################################################################################
comb(n, r, v = 1:n, set = TRUE, repeats.allowed = FALSE)
a matrix of combinations
size of the source vector
size of the target vectors
source vector. Defaults to 1:n
logical flag indicating whether duplicates should be removed from the source vector v
logical flag indicating whether the constructed vectors may include duplicated values
Internal function