gt_catcat: Convert output of categorical cross-tabulation...

View source: R/redaction.R

gt_catcatR Documentation

Convert output of categorical cross-tabulation (redacted_summary_catcat) to gt object

Description

Convert output of categorical cross-tabulation (redacted_summary_catcat) to gt object

Usage

gt_catcat(
  x,
  var1_name = "",
  var2_name = "",
  title = NULL,
  source_note = NULL,
  pct_decimals = 1
)

Arguments

x

The data.frame produced by redacted_summary_catcat.

var1_name

The name of the first categorical variable.

var2_name

The name of the second categorical variable.

title

The title of the table.

source_note

A footnote.

pct_decimals

Decimal precision for percentages.

Details

This function takes the output of redacted_summary_catcat and converts it to a gt object (as from the gt package) for outputting to html/pdf.

Value

A gt object.


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