thinCounts {edgeR}R Documentation

Binomial Thinning of Counts

Description

Reduce the size of Poisson-like counts by binomial thinning.

Usage

thinCounts(x, prob=0.5)

Arguments

x

numeric vector or array of non-negative integers.

prob

numeric scalar or vector, the expected proportion of the counts to keep.

Details

This function calls rbinom with size=x and prob=prob to generate the new counts.

Value

A vector or array of the same dimensions as x, with thinned counts.

Author(s)

Gordon Smyth

Examples

x <- rpois(10,lambda=10)
thinCounts(x)

[Package edgeR version 2.4.3 Index]