format_categorical_stat: Format a categorical statistic for display

View source: R/number_utils.R

format_categorical_statR Documentation

Format a categorical statistic for display

Description

Converts frequency counts into formatted display strings following standard conventions (n, n (%), % only) with locale-aware decimal marks.

Usage

format_categorical_stat(n, total, stat_type, marks)

Arguments

n

Integer count for the category.

total

Integer total count for percentage calculation.

stat_type

Character string: "n", "n_percent", or "percent".

marks

List with big.mark and decimal.mark as returned by resolve_number_marks.

Value

Character string with the formatted statistic.


summata documentation built on May 7, 2026, 5:07 p.m.