Description Usage Arguments See Also Examples
Number of partitions
1 | npartitions(n, k = NULL, distinct = FALSE, bigz = FALSE)
|
n |
an non-negative integer to be partitioned |
k |
number of parts |
distinct |
an logical to restrict distinct values |
bigz |
an logical to use gmp::bigz |
partitions for generating all partitions and ipartitions for iterating partitions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # number of partitions of 10
npartitions(10)
# number of partitions of 10 into 5 parts
npartitions(10, 5)
# integer overflow
## Not run: npartitions(160)
npartitions(160, bigz = TRUE)
# zero sized partitions
npartitions(0)
npartitions(5, 0)
npartitions(5, 6)
npartitions(0, 0)
npartitions(0, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.