permutations.of: Generate every permutation of perm.length item

Description Usage Arguments Value Examples

View source: R/PerMallows.R

Description

This functions returns a matrix in thich each of rows is a different permutation of the specified number of items

Usage

1
permutations.of(perm.length, alert = TRUE)

Arguments

perm.length

number of items in the permutation

alert

optional ask for confirmation when the number of permtuations to show is very large

Value

A collection of every permutation of the specified number of items

Examples

1
2

Example output

Loading required package: Rcpp
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    1    3    2
[3,]    2    1    3
[4,]    2    3    1
[5,]    3    1    2
[6,]    3    2    1
Do you really want to generate all  3628800  permutations? (Y/N)
[1] "Process cancelled"

PerMallows documentation built on May 2, 2019, 6:14 a.m.