Learn R Programming

PerMallows (version 1.13)

runif.permutation: Random permutation

Description

Generate a collection of n permutations uniformly at random

Usage

runif.permutation(n = 1, perm.length)

Arguments

n
optional number of permutations to generate
perm.length
length of the permutations generated

Value

A single permutation or a matrix with n rows, each being a permutation. Every permutation is drawn uniformly at random and has length perm.length

Examples

Run this code
runif.permutation(1,5)

Run the code above in your browser using DataLab