Seurat (version 5.0.3)

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

Description

Apply a ceiling and floor to all values in a matrix

Usage

MinMax(data, min, max)

Value

Returns matrix after performing these floor and ceil operations

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

Examples

Run this code
mat <- matrix(data = rbinom(n = 25, size = 20, prob = 0.2 ), nrow = 5)
mat
MinMax(data = mat, min = 4, max = 5)

Run the code above in your browser using DataLab