% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replace_money.R
\name{replace_money}
\alias{replace_money}
\title{Replace Money With Words}
\usage{
replace_money(
  x,
  pattern = "(-?)([$])([0-9,]+)(\\\\.\\\\d{2})?",
  replacement = NULL,
  ...
)
}
\arguments{
\item{x}{The text variable.}

\item{pattern}{Character money regex string to be matched in the given 
character vector.}

\item{replacement}{A function to operate on the extracted matches or a 
character string which is a replacement for the matched pattern.}

\item{\ldots}{ignored.}
}
\value{
Returns a vector with the pattern replaced.
}
\description{
Replaces money with word equivalents.
}
\examples{
x <- c(
    NA, 
    '$3.16 into "three dollars, sixteen cents"', 
    "-$20,333.18 too", 'fff'
)

replace_money(x)
replace_money(x, replacement = '<<MONEY>>')
}
