compose | R Documentation |
This function composes two permutations or a permutation with a collection of permutations. If one of the arguments is a collection of permutations, the function will compose each permutation in the collection with the other argument. Note that both arguments cannot be collections of permutations at the same time.
compose(perm1, perm2)
perm1 |
A single permutation (as a vector) or a collection of permutations (as a list of vectors). |
perm2 |
A single permutation (as a vector) or a collection of permutations (as a list of vectors). |
The composition of the permutations. If one of the arguments is a collection, the result will be a list of composed permutations.
# Compose two single permutations
compose(c(3, 1, 2, 4), c(4, 1, 3, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.