% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/normalize_units.R
\name{normalize_units}
\alias{normalize_units}
\title{Normalize Numeric Columns Based on Header Unit Declarations}
\usage{
normalize_units(data, strip_units = TRUE)
}
\arguments{
\item{data}{A \code{data.frame}. The data frame to be normalized.}

\item{strip_units}{Logical. If \code{TRUE}, removes the unit declarations from the column names. Default is \code{TRUE}.}
}
\value{
A \code{data.frame} with the normalized data and updated column names.
}
\description{
\code{normalize_units()} scans the column names of a data frame for financial/scientific
unit declarations (e.g., "Revenue (in millions)", "Assets ($k)", "Employees ('000)").
It automatically multiplies the numeric values in the corresponding columns by the
detected multiplier (1,000, 1,000,000, etc.) and optionally strips the unit
declaration from the column name.
}
\examples{
# Scale columns declared in millions and thousands
df <- data.frame(
  `Revenue ($M)` = c(1.5, 2.0),
  `Cost (in thousands)` = c(500, 600),
  check.names = FALSE
)
result <- normalize_units(df)
result$Revenue  # c(1500000, 2000000)
result$Cost     # c(500000, 600000)

}
