% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tableby.internal.R
\name{tbfmt}
\alias{tbfmt}
\alias{tableby.stats.internal}
\alias{as.tbstat}
\alias{as.tbstat_multirow}
\title{Internal \code{tableby} functions}
\usage{
tbfmt(x, digits = NULL, digits.count = NULL, digits.pct = NULL, ...)

as.tbstat(
  x,
  oldClass = NULL,
  fmt = "{y}",
  which.count = 0L,
  which.pct = 0L,
  ...
)

as.tbstat_multirow(x)
}
\arguments{
\item{x}{Usually a vector.}

\item{digits, digits.pct, digits.count}{Digits specifications}

\item{...}{arguments to pass to \code{as.tbstat}.}

\item{oldClass}{class(es) to add to the resulting object.}

\item{fmt}{A \code{\link[glue]{glue}} string, where the object is exposed as the variable \code{x},
and a default-formatted version (using \code{tbfmt}) exposed as the variable \code{y}. \code{digits}, \code{digits.count},
and \code{digits.pct} are also exposed.}

\item{which.count}{Which statistics are counts? The default is 0, indicating that none are.}

\item{which.pct}{Which statistics are percents? The default is 0, indicating that none are.}
}
\description{
A collection of functions that may help users create custom functions that are formatted correctly.
}
\details{
The vignette has an example on how to use these.

  \code{as.tbstat} defines a tableby statistic with its appropriate formatting.

  \code{tbfmt} applies some default formatting.

  \code{as.tbstat_multirow} marks an object (usually a list) for multiple-row printing.
}
