jeudi 10 septembre 2020

How to initialise a random matrix in R with no duplicates in the columns but duplicates allowed in rows

I would like to create a matrix in R, say 1000 by 10, and each column is a random sample without replacement of 1000 numbers between 1 and 1000. I would like this random sample 10 times, one for each column in the matrix.

Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire