jeudi 25 octobre 2018

Randomly sort character vector same way each time

I want to randomize the order of the vector the same way each time. However, the following does not order it the same way each time.

set.seed(1)
data <- ('a', 'b', 'c', 'd', 'e', 'f')  
sample(data)




Aucun commentaire:

Enregistrer un commentaire