I am trying to do something like this (just for illustration, I do know why it doesn't work).
sample(c(TRUE, FALSE), 3, prob=c(0.1,0.2,1), replace=TRUE)
I do have weights with which I want the 3 elements drawn. So element 1 should have a success probability of 0.1, element 2 probability 0.2 and element 3 probability 1. In essence, I am performing a series of Bernoulli trials with different success probabilities.
I think there has to be a simple workaround or another option I am not seeing, bc the only thing that comes to my mind is looping
Looping would be slow as I have at least 5000 if not more cases to go through.
Many thanks for any input.