powered by
shuffle elements of a randomly chosen row of x matrix
shuffle(x)
a matrix with shuffled elements of a row
a matrix
x = matrix(c(3,1,2, 1,2,3,1,3,2,2,1,3),ncol = 3, byrow = TRUE) shuffle(x);
Run the code above in your browser using DataLab