nPerm {kStatistics} | R Documentation |
Permutations of a list or a vector
Description
The function returns all possible different permutations of objects in a list or in a vector.
Usage
nPerm(L = c())
Arguments
L |
List/Vector |
Details
In order to manage permutations of numbers or vectors, the standard permutation process is applied.
Value
list |
all the permutations of |
Author(s)
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
References
C. A. Charalambides (2002) Enumerative Combinatoris, Chapman & Haii/CRC.
Examples
# 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)) )
[Package kStatistics version 2.1.1 Index]