\HeaderA{toString}{toString Converts its Argument to a Character String}{toString}
\methaliasA{toString.default}{toString}{toString.default}
\keyword{utilities}{toString}
\begin{Description}\relax
This is a helper function for \code{\LinkA{format}{format}}. It converts its argument
to a string. If the argument is a vector then its elements are
concatenated with a \code{,} as a separator. 
Most methods should honor the width argument.
\end{Description}
\begin{Usage}
\begin{verbatim}
toString(x, ...)

## Default S3 method:
toString(x, width, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] The object to be converted.
\item[\code{width}] The returned value has at most \code{width} characters.
The minimum value accepted is 6 and smaller values are taken as 6.
\item[\code{...}] Optional arguments for methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The default method returns the first \code{width - 4} characters of
the result with \code{....} appended, if the full result would use
more than \code{width} characters.
\end{Details}
\begin{Value}
A character vector of length 1 is returned.
\end{Value}
\begin{Author}\relax
Robert Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{format}{format}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- c("a", "b", "aaaaaaaaaaa")
toString(x)
toString(x, width=8)
\end{ExampleCode}
\end{Examples}

