Adds a margin to marginMatrix
addMargin(
marginMatrix,
varName,
vecTotals,
adjustToOne = TRUE,
thresholdAdjustToOne = 0.01
)
The matrix of margins to add the new margin to
Name of variable in calibration matrix corresponding to the new margin
values of margins (Calmar style) for the variable. Note : if length(vecTotals) > 1, then sum(thresholdAdjustToOne) has to be 1.
if TRUE and sum(vecTotals) is nearly 1, modify values of vecTotals so that sum is 1.
adjust sum(vecTotals) to 1 if difference is under thresholdAdjustToOne