filterPmat: Filter rows of p-value matrix under the significance...

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Filter rows of p-value matrix under the significance threshold

Usage

1
filterPmat(x, threshold)

Arguments

x

A matrix of p-values. It must be raw p-values and should not be transformed (e.g. logarithmic).

threshold

A numeric value, the minimal p-value used to filter rows. If missing, given the values of NA, NULL or number 0, no filtering will be done and the input matrix will be returned.

Value

Matrix of p-values. If no line is left, a empty matrix of the same dimension as input will be returned.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

1
2
3
4
5
6
7
8
9
set.seed(1235)
testMatrix <- matrix(runif(100,0,1), nrow=10)

## filtering
(testMatrix.filter <- filterPmat(testMatrix, threshold=0.05))
## more strict filtering
(testMatrix.strictfilter <- filterPmat(testMatrix, threshold=0.01))
## no filtering
(testMatrix.nofilter <- filterPmat(testMatrix))

Accio/BioQC documentation built on Jan. 27, 2022, 10:45 p.m.