perm: Lists permutations of a vector with distinct entries

View source: R/perm.R

permR 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)

Tex4exams documentation built on May 31, 2023, 8:04 p.m.

Related to perm in Tex4exams...