replace_values: Replace values in an integer adjacency matrix.

replace_valuesR Documentation

Replace values in an integer adjacency matrix.

Description

Replace values in an integer matrix, that are lower than a certain threshold.

Usage

replace_values(mat, threshold, replace_higher = TRUE)

Arguments

mat

An integer matrix

threshold

All values in the matrix lower than this values are replaced by 0.

replace_higher

If set to true, all values >= threshold are replaced by 1.

Value

An integer matrix with (partially) replaced values.

Examples

replace_values(matrix(seq(1, 16), nrow=4), threshold=4)


tdrose/mosbi documentation built on May 4, 2022, 3:22 p.m.