Skip to content
Prev 206092 / 398503 Next

Conditional Sampling

Would the following work, or is there a reason why it would not?

risk.set  <- 1:100
first.10  <- sample(risk.set, 10)	
remainder <- setdiff(risk.set, first.10)

for ( i in 1:1000 )
{
     next.5 <- sample(remainder, 5)
     do.something.with(next.5)
}

Best,
Magnus
On 1/12/2010 9:00 AM, ehcpieterse wrote: