Create permutation and combination in R