50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

PerMallows (version 1.8)

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