binary_convert: Discretize data to binary form

Description Usage Arguments Author(s) Examples

View source: R/binary_convert.R

Description

Convert values within a matrix to binary form (0 or 1)

Usage

1
binary_convert(matrix, threshold)

Arguments

matrix

A matrix that contains numbers in real values

threshold

A positive real value that determines the cutoff

Author(s)

Peter I-Fan Wu

Examples

1
2
mat=matrix(c(1:12),nrow=3)
binary_convert(mat,threshold = 5)

peterwu19881230/microbialPhenotypes documentation built on March 19, 2021, 6:36 a.m.