?rbinom
only says:
size: number of trials (zero or more).
prob: probability of success on each trial.
But they can be vectors.
BTW, you were aked to "PLEASE ... provide minimal, self-contained,
reproducible code."
What you show cannot run without correction.
Most likel
Hi
I have two vectors, prob and size, and I want to add the random deviates
of these two, i.e.
sum(
sapply(
1:length(prob),
function(n){ rbinom(1, size(n), prob(n) }
)
)
My problem is that I have to do this for a large number of value
combinations. Is there a
2 matches
Mail list logo