StatsBase, sampling without "putting back"


Using the StatsBase package, it is possible to take samples using various procedures. Seems to me, but only with “put back”. This means that the same sample is taken several times.

Is there a parameter or a procedure that allows me to draw samples without “putting back”?

Of course, I would like to have 30 samples in the end, for example, so I don’t just want to remove the multiple entries.

I am happy if someone can give me a hint!
Many greetings,

The English term is with/without replacement, and StatsBase.sample has a replace keyword for it.


It’s working!

i_Training = sample(i_Zeilen, n_Training, replace = false, ordered = true)

Sorry, that was too easy! :flushed:
Thank you!