Adapted directly from the sample help file. resampleZeroProof is a version that works even if sum of all probabilities passed to sample.int is zero. This causes an error in sample.int. This function is intended for internal use only.

resample(x, ...)

resampleZeroProof(spreadProbHas0, x, n, prob)

## Arguments

x

either a vector of one or more elements from which to choose, or a positive integer. See ‘Details.’

...

Passed to sample

/ogical. Does spreadProb have any zeros on it.