[R] Sampling procedure

Marcio Resende mresendeufv at yahoo.com.br
Thu Oct 15 16:19:32 CEST 2009


I would like to divide a vector in 9 groups in a way that each number is
present in only one group.
In a vector of 783 I would like to divide in 9 different groups of 87

Example <- matrix(c(1:783),ncol = 1)
s1 <- as.matrix(sample(Example,87, re = FALSE))
Example <- Example[-s1]
s2 <- as.matrix(sample(Example,87, re = FALSE))
#however I don´t know how to remove the second group from the "Example" to
continue sampling.

There is probably an easy and faster way to do this.
Could anybody help me?
Thanks
-- 
View this message in context: http://www.nabble.com/Sampling-procedure-tp25909497p25909497.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list