% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mathematical_functions.R
\name{roundIntegerSum}
\alias{roundIntegerSum}
\title{roundIntegerSum (internal function)}
\usage{
roundIntegerSum(vec, targetSum)
}
\arguments{
\item{vec}{Vector of integers.}

\item{targetSum}{The target sum to be reached.}
}
\value{
The updated vector with the desired total sum.
}
\description{
update a numeric vector such that it's composed of integers and its sum
reaches a desired total. Positive or negative discrepancies are distributed
proportionally between the summands.
}
\references{
\url{http://rmpiro.net/decompTumor2Sig/}\cr
Krueger, Piro (2019) decompTumor2Sig: Identification of mutational
signatures active in individual tumors. BMC Bioinformatics
20(Suppl 4):152.\cr
}
\author{
Rosario M. Piro\cr Politecnico di Milano\cr Maintainer: Rosario
M. Piro\cr E-Mail: <rmpiro@gmail.com> or <rosariomichael.piro@polimi.it>
}
\keyword{internal}
