nPerm | R Documentation |
The function returns all possible different permutations of objects in a list or in a vector.
nPerm(L = c())
L |
List/Vector |
In order to manage permutations of numbers or vectors, the standard permutation process is applied.
list |
all the permutations of |
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
C. A. Charalambides (2002) Enumerative Combinatoris, Chapman & Haii/CRC.
# permutations of 1,2,3 nPerm( c(1,2,3) ) # permutations of 1,2,1 (two elements are equal) nPerm( c(1,2,1) ) # permutations of the words "Alice", "Bob","Jack" nPerm( c("Alice", "Bob","Jack") ) # permutations of the vectors c(0,1), c(2,3), c(7,3) nPerm( list(c(0,1), c(2,3), c(7,3)) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.