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

PerMallows (version 1.1)

r.dist.d: Generate a collection of permutations at a given distance

Description

Given a number of permutations, the number of items in the permutations, a distance value and a distance name, generate a sample of permutations with the specified length at the given distance

Usage

r.dist.d(n, perm.length, dist.value, dist.name = "kendall")

Arguments

n
number of permutations in the sample
perm.length
number of items in the permutations
dist.value
distance value
dist.name
distance name. One of: kendall (default), cayley, hamming, ulam

Value

  • a sample of permutations at the given distance

Examples

Run this code
r.dist.d(1, 4, 2, 'ulam')

Run the code above in your browser using DataLab