% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dt2_formats.R
\name{dt2_format_number}
\alias{dt2_format_number}
\title{Format numeric columns (DataTables renderer: number)}
\usage{
dt2_format_number(
  options = list(),
  col_specs,
  thousands = NULL,
  decimal = NULL,
  digits = 0,
  prefix = "",
  prefix_right = ""
)
}
\arguments{
\item{options}{List of options (returned, with \code{columnDefs} updated).}

\item{col_specs}{Column names or 1-based indices to format.}

\item{thousands}{Thousands separator (character or \code{NULL} for auto).}

\item{decimal}{Decimal separator (character or \code{NULL} for auto).}

\item{digits}{Number of decimal places.}

\item{prefix, prefix_right}{String to prepend/append (e.g., currency symbol).}
}
\value{
Modified \code{options}.
}
\description{
Add a number renderer to one or more columns using
DataTables' built-in \code{DataTable.render.number}.
}
\examples{
opts <- list(columns = names(iris))
opts <- dt2_format_number(opts, "Sepal.Length", thousands = ".", decimal = ",",
                          digits = 2, prefix = "", prefix_right = "")
}
