Hallo I assume you want equal size samples
x<-runif(1000) this construction gives you "y" to be set if sum(y) > 5 while(sum(y<-sample(x,10))<5) y<-sample(x,10) Cheers On 4 Dec 2003 at 8:18, [EMAIL PROTECTED] wrote: > Hi all, > I?m working with a dataset with 9 columns and 2000 rows. Each row > represents an individual and one of the columns represents the volume > of that individual (measured in cubic meters). I?d like to select a > sample from this dataset (without considering any probability of the > rows) in which the sum of the volume of the individuals in that sample > >= 100 cubic m. I?ll appreciate any suggestion Thanks CM > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help Petr Pikal [EMAIL PROTECTED] ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help