NContributorsRule {GaussSuppression} | R Documentation |
Number of contributors suppression rule
Description
The number of contributors is the number unique contributing 'charVar' codes.
Usage
NContributorsRule(
data,
freq,
numVar,
x,
maxN = 3,
protectZeros = FALSE,
charVar = NULL,
removeCodes = character(0),
remove0 = TRUE,
...
)
Arguments
data |
Input data as a data frame |
freq |
Vector of aggregate frequencies |
numVar |
Numerical variables. When several variables, only first is used. |
x |
Model matrix generated by parent function |
maxN |
Suppression threshold. Cells where the number of unique contributors
(based on |
protectZeros |
Suppression parameter. Only TRUE (default) is used implemented. |
charVar |
Variable(s) with contributor codes. When empty, unique contributor in each row is assumed. When several variables, see details. |
removeCodes |
Codes to exclude when counting contributors.
Can be specified as a character vector (applied to all |
remove0 |
When set to |
... |
unused parameters |
Details
When several charVar
variables, the rule is applied independently to each variable.
Primary suppression in at least one case results in primary suppression in the output.
As described in the documentation for the maxN
and removeCodes
parameters,
it is possible to specify them independently for each charVar
.
Value
List where first element is logical vector defining primary suppressions.
The second element is data frame where nRule
is number contributors used
in rule and where nAll
is similar, but without omitting codes in removeCodes
.