redactor: Indicates which values to redact from a vector of frequencies

View source: R/redaction.R View source: R/codelists.R

redactorR Documentation

Indicates which values to redact from a vector of frequencies

Description

Indicates which values to redact from a vector of frequencies

Indicates which values to redact from a vector of frequencies

Usage

redactor(n, threshold)

redactor(n, threshold)

Arguments

n

A vector of integer frequencies or counts from a 1-dimension frequency distribution.

threshold

The redaction threshold. All values (and possibly more; see details) less than or equal to this threshold will be redacted.

Details

Given a vector of frequencies n, this function returns a logical vector of frequencies to be redacted. All frequencies less than or equal to the threshold are redacted. If the sum the redacted frequencies is also less than or equal to the threshold, then the smallest unredacted frequency is also redacted.

Given a vector of frequencies n, this function returns a logical vector of frequencies to be redacted. All frequencies less than or equal to the threshold are redacted. If the sum the redacted frequencies is also less than or equal to the threshold, then the smallest unredacted frequency is also redacted.

Value

A logical vector the same length as n.

A logical vector the same length as n.


wjchulme/osutils documentation built on Dec. 20, 2024, 9:56 a.m.