\Header{chartr}{Character Translation}
\alias{tolower}{chartr}
\alias{toupper}{chartr}
\keyword{character}{chartr}
\begin{Description}\relax
Translate characters in character vectors.\end{Description}
\begin{Usage}
\begin{verbatim}
chartr(old, new, x)
tolower(x)
toupper(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a character vector.
\item[\code{old}] a character string specifying the characters to be
translated.
\item[\code{new}] a character string specifying the translations.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{chartr} translates each character in \code{x} that is specified
in \code{old} to the corresponding character specified in \code{new}.
Ranges are supported in the specifications, but character classes and
repreated characters are not.  If \code{old} contains more characters
than new, an error is signaled; if it contains fewer characters, the
extra characters at the end of \code{new} are ignored.  

\code{tolower} and \code{toupper} convert upper-case characters in a
character vector to lower-case, or vice versa.  Non-alphabetic
characters are left unchanged.\end{Details}
\begin{Examples}
\begin{ExampleCode}
x <- "MiXeD cAsE 123"
chartr("iXs", "why", x)
chartr("a-cX", "D-Fw", x)
tolower(x)
toupper(x)
\end{ExampleCode}
\end{Examples}

