Skip to content
Prev 303797 / 398513 Next

Iterative sampling with restrictions

Hi

why not shuffle your values by

x <- 1:60
x <- sample(x, 60)

and then add groups
groups <- rep(paste("g",1:3, sep=""), each=20)

If you want you can suffle also groups.

Regards
Petr