addMargin {icarus} | R Documentation |
Adds a margin to marginMatrix
Description
Adds a margin to marginMatrix
Usage
addMargin(
marginMatrix,
varName,
vecTotals,
adjustToOne = TRUE,
thresholdAdjustToOne = 0.01
)
Arguments
marginMatrix |
The matrix of margins to add the new margin to |
varName |
Name of variable in calibration matrix corresponding to the new margin |
vecTotals |
values of margins (Calmar style) for the variable. Note : if length(vecTotals) > 1, then sum(thresholdAdjustToOne) has to be 1. |
adjustToOne |
if TRUE and sum(vecTotals) is nearly 1, modify values of vecTotals so that sum is 1. |
thresholdAdjustToOne |
adjust sum(vecTotals) to 1 if difference is under thresholdAdjustToOne |
[Package icarus version 0.3.2 Index]