replace_values_float: Replace values in a adjacency matrix.

replace_values_floatR Documentation

Replace values in a adjacency matrix.

Description

Same as replace_values, but for (positive) non-integer matrices.

Usage

replace_values_float(mat, threshold, replace_higher = TRUE)

Arguments

mat

A numeric 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.

Details

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

Value

A numeric matrix with (partially) replaced values.

Examples

replace_values(matrix(rnorm(100), nrow=10), threshold=1)


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