roundIntegerSum {decompTumor2Sig} | R Documentation |
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.
roundIntegerSum(vec, targetSum)
vec |
Vector of integers. |
targetSum |
The target sum to be reached. |
The updated vector with the desired total sum.
Rosario M. Piro
Freie Universitaet Berlin
Maintainer: Rosario
M. Piro
E-Mail: <rmpiro@gmail.com> or <r.piro@fu-berlin.de>
http://rmpiro.net/decompTumor2Sig/
Krueger, Piro (2018) decompTumor2Sig: Identification of mutational
signatures active in individual tumors. BMC Bioinformatics (accepted for
publication).
Krueger, Piro (2017) Identification of Mutational Signatures Active in
Individual Tumors. NETTAB 2017 - Methods, Tools & Platforms for
Personalized Medicine in the Big Data Era, October 16-18, 2017, Palermo,
Italy. PeerJ Preprints 5:e3257v1, 2017.