ScaleByQuantile: Winsorize a count matrix using fixed quantiles by row

Description Usage Arguments Author(s) Examples

View source: R/src_ScaleByQuantile.R

Description

Per row trim the values beyond the specified quantiles to that quantile, can be useful e.g. when plotting heatmaps to limit influence of outliers Takes a numeric matrix or data.frame and returns one with the winsorized values.

Usage

1
ScaleByQuantile(Counts, lower = 0, upper = 1)

Arguments

Counts

a matrix or dataframe with the count data

lower

bottom quantile

upper

top quantile

Author(s)

Alexander Toenges

Examples

1
2
3
Counts <- sapply(seq(1,10), function(x) rnorm(1000,100))
ScaleByQuantile(Counts=Counts,lower=0.1,upper=0.9)
 

ATpoint/diffanalyseR documentation built on Oct. 8, 2021, 10:11 p.m.