Hello Richie,
I would like to do three (or k) swap steps in each step just 2 ID recursive swaping
x <- 1:10
swap <- function(x){
  a <- sample(x,2)
  x[x==a[1]] <- swap[2]
  x[x==a[2]] <- swap[1]
  return(x)
  }
  swap(swap(swap(x))) -> mix
  
Is this possible?
Thanks you in advance!
Amor

__________________________________________________


 Schutz gegen Massenmails. 

	[[alternative HTML version deleted]]

