thinCounts {edgeR} | R Documentation |
Reduce the size of Poisson-like counts by binomial thinning.
thinCounts(x, prob=0.5)
x |
numeric vector or array of non-negative integers. |
prob |
numeric scalar or vector, the expected proportion of the counts to keep. |
This function calls rbinom
with size=x
and prob=prob
to generate the new counts.
A vector or array of the same dimensions as x
, with thinned counts.
Gordon Smyth
x <- rpois(10,lambda=10) thinCounts(x)