% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{MinMax}
\alias{MinMax}
\title{Apply a ceiling and floor to all values in a matrix}
\usage{
MinMax(data, min, max)
}
\arguments{
\item{data}{Matrix or data frame}

\item{min}{all values below this min value will be replaced with min}

\item{max}{all values above this max value will be replaced with max}
}
\value{
Returns matrix after performing these floor and ceil operations
}
\description{
Apply a ceiling and floor to all values in a matrix
}
\examples{
mat <- matrix(data = rbinom(n = 25, size = 20, prob = 0.2 ), nrow = 5)
mat
MinMax(data = mat, min = 4, max = 5)

}
\concept{utilities}
