% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers_table1.R
\name{fmt_n_pct}
\alias{fmt_n_pct}
\title{Format count and percentage as "n (pct\%)"}
\usage{
fmt_n_pct(n, d, n_digits = 0, pct_digits = 1, use_abs = FALSE)
}
\arguments{
\item{n}{Numeric scalar. The count (numerator).}

\item{d}{Numeric scalar. The denominator.}

\item{n_digits}{Integer. Decimal places for the count (default 0).}

\item{pct_digits}{Integer. Decimal places for the percentage (default 1).}

\item{use_abs}{Logical. If TRUE, use absolute values (default FALSE).}
}
\value{
Character string in the form "n (pct\%)", or "NA" when inputs are
missing or \code{d == 0}.
}
\description{
Format count and percentage as "n (pct\%)"
}
\keyword{internal}
