Sometimes one needs to ensure all rows or all columns sum to integers. Of course one could use t(apply(X, 1, roundfixS)) but it would be nice if roundfixS handled matrices.
Possibly add an axis= or margin= argument or another possibility is to have rowRoundfixS and colRoundfixS functions analogous to rowSums and colSums or maybe other possibilities?
Sometimes one needs to ensure all rows or all columns sum to integers. Of course one could use
t(apply(X, 1, roundfixS))but it would be nice ifroundfixShandled matrices.Possibly add an
axis=ormargin=argument or another possibility is to haverowRoundfixSandcolRoundfixSfunctions analogous torowSumsandcolSumsor maybe other possibilities?