# NOT RUN {
permutations(3)
permutations(x = LETTERS[1:3])
# choose 2 from 4
permutations(4, 2)
permutations(x = LETTERS[1:3], k = 2)
# multiset with frequencies c(2, 3)
permutations(freq = c(2, 3), k = 3)
# with replacement
permutations(4, 2, replace = TRUE)
# column major
permutations(3, type = "c")
permutations(4, 2, type = "c")
# list output
permutations(3, type = "l")
permutations(4, 2, type = "l")
# zero sized partitions
dim(permutations(0))
dim(permutations(5, 0))
dim(permutations(5, 6))
dim(permutations(0, 0))
dim(permutations(0, 1))
# }
Run the code above in your browser using DataLab