View source: R/calmarFunctions.R
addMargin | R Documentation |
Adds a margin to marginMatrix
addMargin(
marginMatrix,
varName,
vecTotals,
adjustToOne = TRUE,
thresholdAdjustToOne = 0.01
)
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.