Re: [R] Sampling procedure

2009-10-15 Thread David Winsemius
ter Cc: 'Marcio Resende'; r-help@r-project.org Subject: Re: [R] Sampling procedure If parsimony is needed, then define a 9-row matrix and send a randomized indexed version of Example to it: s<-matrix(NA, nrow=9, ncol=length(Example)/9) s[,] <- Example[sample(Example, length(Example) )]

Re: [R] Sampling procedure

2009-10-15 Thread Bert Gunter
net] Sent: Thursday, October 15, 2009 8:48 AM To: Bert Gunter Cc: 'Marcio Resende'; r-help@r-project.org Subject: Re: [R] Sampling procedure If parsimony is needed, then define a 9-row matrix and send a randomized indexed version of Example to it: s<-matrix(NA, nrow=9, nc

Re: [R] Sampling procedure

2009-10-15 Thread David Winsemius
nal Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of David Winsemius Sent: Thursday, October 15, 2009 7:55 AM To: Marcio Resende Cc: r-help@r-project.org Subject: Re: [R] Sampling procedure On Oct 15, 2009, at 10:19 AM, Marcio Resende wrote: I

Re: [R] Sampling procedure

2009-10-15 Thread Bert Gunter
, 2009 7:55 AM To: Marcio Resende Cc: r-help@r-project.org Subject: Re: [R] Sampling procedure On Oct 15, 2009, at 10:19 AM, Marcio Resende wrote: > > 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 li

Re: [R] Sampling procedure

2009-10-15 Thread David Winsemius
On Oct 15, 2009, at 10:19 AM, Marcio Resende wrote: 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) > Example <- matrix(c(1:783)

[R] Sampling procedure

2009-10-15 Thread Marcio Resende
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(sa