threshold: Apply thresholds to a score or loading matrix

Description Usage Arguments Value Methods (by class) Examples

Description

Returns a binary matrix of the same size as m where all elements over the threshold are 1.

Usage

1
2
3
4
threshold(m, th, MARGIN = 2)

## S4 method for signature 'matrix,numeric'
threshold(m, th, MARGIN = 2)

Arguments

m

A numeric matrix

th

A numeric vector with the same number of elements as dim(m)[[MARGIN]]

MARGIN

1 to threshold rows; 2 to threshold columns.

Value

A binary numeric matrix of the same dimensions as m

Methods (by class)

Examples

1
2
3
m <- matrix(rnorm(100), 10, 10)
m
threshold(m = m, th = rep(0, 10), MARGIN = 1)

jonalim/mfBiclust documentation built on May 4, 2019, 4:13 a.m.