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