# NOT RUN {
# all partitions of 6
partitions(6)
# reversed lexicographical order
partitions(6, descending = TRUE)
# fixed number of parts
partitions(10, 5)
# reversed lexicographical order
partitions(10, 5, descending = TRUE)
# column major
partitions(6, type = "c")
partitions(6, 3, type = "c")
# list output
partitions(6, type = "l")
partitions(6, 3, type = "l")
# zero sized partitions
dim(partitions(0))
dim(partitions(5, 0))
dim(partitions(5, 6))
dim(partitions(0, 0))
dim(partitions(0, 1))
# }
Run the code above in your browser using DataLab