Re: [R] Iterative sampling with restrictions

2012-08-22 Thread David L Carlson
:11 PM > To: 'Daniel Nordlund'; r-help@r-project.org > Subject: Re: [R] Iterative sampling with restrictions > > If I understand you, this is just random assignment over 6 groups: 1/2, > 1/3, > 2/1, 2/3, 3/1, 3/2. > > > groups <- c("1/2", "1/3

Re: [R] Iterative sampling with restrictions

2012-08-22 Thread David L Carlson
project.org] On Behalf Of Daniel Nordlund > Sent: Tuesday, August 21, 2012 2:58 AM > To: r-help@r-project.org > Subject: Re: [R] Iterative sampling with restrictions > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >

Re: [R] Iterative sampling with restrictions

2012-08-21 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of David A. Kim > Sent: Monday, August 20, 2012 9:17 PM > To: r-help@r-project.org > Subject: [R] Iterative sampling with restrictions > > Hi all, > > I'm working on a seemingly tri

Re: [R] Iterative sampling with restrictions

2012-08-21 Thread PIKAL Petr
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 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On