Skip to content
Prev 313942 / 398506 Next

create stratified splits

Hi,


I have a vector like:

r <- runif(100)

Now I would like to split r into 10 pieces (each with 10 elements) ?
but the 'pieces' should be roughly similar with regard to mean and sd.

what is an efficient way to do this in R?


thanks!