combocalc {phonTools} | R Documentation |
Combinations and Permutations
Description
Calculate the number of combinations or permutations for a number of objects.
Usage
combocalc (objects, choose, order = FALSE, repetition = TRUE)
Arguments
objects |
The number of different kinds of objects available for selection. |
choose |
The number of objects selected at a given time. |
order |
If TRUE, the order of the objects matters, for example aba != aab. |
repetition |
If TRUE, a sequence such as bbb is permissible. |
Author(s)
Santiago Barreda <sbarreda@ucdavis.edu>
Examples
# combinations, no repetition
combocalc (10, 4, order = FALSE, repetition = FALSE)
# combinations, with repetition
combocalc (10, 4, order = FALSE, repetition = TRUE)
# permutations, no repetition
combocalc (10, 4, order = TRUE, repetition = FALSE)
# permutations, with repetition
combocalc (10, 4, order = TRUE, repetition = TRUE)
[Package phonTools version 0.2-2.2 Index]