EVOLUTION-MANAGER
Edit File: toString.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Convert an R Object to a Character String</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for toString {base}"><tr><td>toString {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert an R Object to a Character String</h2> <h3>Description</h3> <p>This is a helper function for <code><a href="format.html">format</a></code> to produce a single character string describing an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object. </p> <h3>Usage</h3> <pre> toString(x, ...) ## Default S3 method: toString(x, width = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>The object to be converted.</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>Suggestion for the maximum field width. Values of <code>NULL</code> or <code>0</code> indicate no maximum. The minimum value accepted is 6 and smaller values are taken as 6.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Optional arguments passed to or from methods.</p> </td></tr> </table> <h3>Details</h3> <p>This is a generic function for which methods can be written: only the default method is described here. Most methods should honor the <code>width</code> argument to specify the maximum display width (as measured by <code><a href="nchar.html">nchar</a>(type = "width")</code>) of the result. </p> <p>The default method first converts <code>x</code> to character and then concatenates the elements separated by <code>", "</code>. If <code>width</code> is supplied and is not <code>NULL</code>, the default method returns the first <code>width - 4</code> characters of the result with <code>....</code> appended, if the full result would use more than <code>width</code> characters. </p> <h3>Value</h3> <p>A character vector of length 1 is returned. </p> <h3>Author(s)</h3> <p> Robert Gentleman </p> <h3>See Also</h3> <p><code><a href="format.html">format</a></code> </p> <h3>Examples</h3> <pre> x <- c("a", "b", "aaaaaaaaaaa") toString(x) toString(x, width = 8) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>