MinMax: Apply a ceiling and floor to all values in a matrix

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Apply a ceiling and floor to all values in a matrix

Usage

1

Arguments

data

Matrix or data frame

min

all values below this min value will be replaced with min

max

all values above this max value will be replaced with max

Value

Returns matrix after performing these floor and ceil operations

Examples

1
2
3
mat <- matrix(data = rbinom(n = 25, size = 20, prob = 0.2 ), nrow = 5)
mat
MinMax(data = mat, min = 4, max = 5)

ibseq/scs-analysis documentation built on Feb. 27, 2021, 12:35 a.m.