new create permutations script in r