gt_catnum: Convert output of categorical-numeric cross-tabulation...

View source: R/redaction.R

gt_catnumR Documentation

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

Description

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

Usage

gt_catnum(x, cat_name = "", num_name = "", num_decimals = 1, pct_decimals = 1)

Arguments

x

The data.frame produced by redacted_summary_catnum.

cat_name

The categorical variable name.

num_name

The numeric variable name.

num_decimals

Decimal precision for numbers.

pct_decimals

Decimal precision for percentages.

Details

This function takes the output of redacted_summary_catnum 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.