perm {Tex4exams}R Documentation

Lists permutations of a vector with distinct entries

Description

perm(v) lists permutations of a vector v with distinct entries. The output is a matrix with each row a permutation. It cannot distinguish identical permutations.

Usage

perm(v)

Arguments

v

is a vector with distinct entries.

Value

an n! by n matrix with each row a permuation of the enties of v.

See Also

permucycle, permuorder,cycledisplay

Examples

x <-  sample(c((-10):10),3)
perm(x)

[Package Tex4exams version 0.1.2 Index]