\Header{sign}{Sign Function}
\keyword{arith}{sign}
\begin{Description}\relax
\code{sign} returns a vector with the signs of the corresponding
elements of \code{x} (the sign of a real number is 1, 0, or \eqn{-1}{}
if the number is positive, zero, or negative, respectively).

Note that \code{sign} does not operate on complex vectors.
\end{Description}
\begin{Usage}
\begin{verbatim}
sign(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric vector
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is a generic function: methods can be defined for it
directly or via the \code{\Link{Math}} group generic.
\end{Details}
\begin{SeeAlso}\relax
\code{\Link{abs}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
sign(pi) # == 1
sign(-2:3)# -1 -1 0 1 1 1
\end{ExampleCode}
\end{Examples}

