Skip to content
Snippets Groups Projects
getBinExpression.Rd 799 B
Newer Older
Arnaud Duvermy's avatar
Arnaud Duvermy committed
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/basal_expression_scaling.R
Arnaud Duvermy's avatar
Arnaud Duvermy committed
\name{getBinExpression}
\alias{getBinExpression}
\title{Get bin expression for a data frame.}
\usage{
getBinExpression(dtf_coef, n_bins)
}
\arguments{
\item{dtf_coef}{A data frame containing the values to be binned.}

\item{n_bins}{The number of bins to create.}
}
\value{
A data frame with an additional column named \code{binExpression}, containing the bin labels.
}
\description{
This function divides the values of a specified column in a data frame into \code{n_bins} bins of equal width.
The bin labels are then added as a new column in the data frame.
}
\examples{
dtf <- data.frame(mu_ij = c(10, 20, 30, 15, 25, 35, 40, 5, 12, 22))
dtf_with_bins <- getBinExpression(dtf, n_bins = 3)

}