downsampleCounts {scater} | R Documentation

## Downsample a count matrix

### Description

Downsample a count matrix to a desired proportion.

### Usage

    downsampleCounts(x, prop)

### Arguments

`x` | matrix of counts
`prop` | numeric scalar or vector of length `ncol(x)` in [0, 1] indicating the downsampling proportion

### Details

This function calls `downsampleMatrix`. from the DropletUtils package. It is deprecated and will be removed in the next release.

### Value

an integer matrix of downsampled counts

### Examples

    sce10x <- read10xResults(system.file("extdata", package="scater"))
    downsampled <- downsampleCounts(counts(sce10x), prop = 0.5)

[Package scater version 1.8.4 Index]