format_survival_cells: Vectorized survival cell formatting

View source: R/surv_utils.R

format_survival_cellsR Documentation

Vectorized survival cell formatting

Description

Formats survival probability cells for multiple rows at once. Uses locale-aware decimal marks and safe CI separators that avoid ambiguity with negative values or decimal commas.

Usage

format_survival_cells(
  est,
  lower,
  upper,
  n_risk,
  n_event,
  stats,
  fmt_est,
  fmt_ci_lower,
  fmt_ci_upper,
  percent,
  marks = NULL
)

Arguments

est

Numeric vector of estimates.

lower

Numeric vector of lower CI bounds.

upper

Numeric vector of upper CI bounds.

n_risk

Integer vector of numbers at risk.

n_event

Integer vector of event counts.

stats

Character vector of statistics to include.

fmt_est

Format string for estimate.

fmt_ci_lower

Format string for lower CI bound.

fmt_ci_upper

Format string for upper CI bound.

percent

Logical whether percentages.

marks

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

Value

Character vector of formatted cells.


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