[R] Selecting subsamples

Petr Pikal petr.pikal at precheza.cz
Thu Dec 4 13:41:48 CET 2003


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, christian_mora at vtr.net 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list