[R] create stratified splits

Martin Batholdy batholdy at googlemail.com
Wed Dec 19 21:23:44 CET 2012


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! 


More information about the R-help mailing list