powered by
np_multiset(f, r)
x = c("a","a","b") # possible permutations of size 2 are "aa", "ab" and "ba". np_multiset(table(x), 2) # = 3
Run the code above in your browser using DataLab