Learn R Programming

PerMallows (version 1.8)

insert.at: Insert operator

Description

Given a permutation and two positions i, j, move item in position i to position j

Usage

insert.at(perm, i, j)

Arguments

perm
a permutation
i
position of the permutation
j
position of the permutation

Value

  • The permutation in the input in which th eoperation has been applied

Examples

Run this code
insert.at(c(1,2,3,4,5),5,2)
insert.at(c(1,2,3,4,5),2,5)

Run the code above in your browser using DataLab