binary: Take a matrix and binary it

Description Usage Arguments Value Examples

View source: R/binary.R

Description

Take a matrix and binary it

Usage

1
binary(matrix, threshold)

Arguments

matrix

A matrix

threshold

A number.

Value

The binaried version of matrix setting things above threshold to 1 and below to zero.

Examples

1
binary(matrix(c(100,50,0,100),nrow = 2), 70)

drmonaco/AVARDA documentation built on Dec. 20, 2021, 1:18 a.m.