redacted_summary_catnum: Categorical by numeric cross-tabulation, with redaction if...

View source: R/redaction.R

redacted_summary_catnumR Documentation

Categorical by numeric cross-tabulation, with redaction if necessary

Description

Categorical by numeric cross-tabulation, with redaction if necessary

Usage

redacted_summary_catnum(
  variable_cat,
  variable_num,
  threshold = 5L,
  .missing_name = "(missing)",
  .redacted_name = "redacted"
)

Arguments

variable_cat

The categorical vector (or will be coerced to one)

variable_num

The numeric vector

threshold

The redaction threshold. If the length of x is less than or equal to this threshold, then no summary values will be reported.

.missing_name

The string used to replace NA categories.

.redacted_name

The string used to replace redacted values.

Details

This function takes a categorical vector and a numeric vector of the same length, and performs a cross-tabulation. Summary statistics are redacted according to the rules in redactor.

Value

A table of summary statistics for the numeric variable, stratified by the categorical variable


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