EVOLUTION-MANAGER
Edit File: name.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: Names and Symbols</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 name {base}"><tr><td>name {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Names and Symbols</h2> <h3>Description</h3> <p>A ‘name’ (also known as a ‘symbol’) is a way to refer to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects by name (rather than the value of the object, if any, bound to that name). </p> <p><code>as.name</code> and <code>as.symbol</code> are identical: they attempt to coerce the argument to a name. </p> <p><code>is.symbol</code> and the identical <code>is.name</code> return <code>TRUE</code> or <code>FALSE</code> depending on whether the argument is a name or not. </p> <h3>Usage</h3> <pre> as.symbol(x) is.symbol(x) as.name(x) is.name(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object to be coerced or tested.</p> </td></tr> </table> <h3>Details</h3> <p>Names are limited to 10,000 bytes (and were to 256 bytes in versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> before 2.13.0). </p> <p><code>as.name</code> first coerces its argument internally to a character vector (so methods for <code>as.character</code> are not used). It then takes the first element and provided it is not <code>""</code>, returns a symbol of that name (and if the element is <code>NA_character_</code>, the name is <code>`NA`</code>). </p> <p><code>as.name</code> is implemented as <code><a href="vector.html">as.vector</a>(x, "symbol")</code>, and hence will dispatch methods for the generic function <code>as.vector</code>. </p> <p><code>is.name</code> and <code>is.symbol</code> are <a href="Primitive.html">primitive</a> functions. </p> <h3>Value</h3> <p>For <code>as.name</code> and <code>as.symbol</code>, an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object of type <code>"symbol"</code> (see <code><a href="typeof.html">typeof</a></code>). </p> <p>For <code>is.name</code> and <code>is.symbol</code>, a length-one logical vector with value <code>TRUE</code> or <code>FALSE</code>. </p> <h3>Note</h3> <p>The term ‘symbol’ is from the LISP background of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, whereas ‘name’ has been the standard S term for this. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="call.html">call</a></code>, <code><a href="is.language.html">is.language</a></code>. For the internal object mode, <code><a href="typeof.html">typeof</a></code>. </p> <p><code><a href="../../grDevices/html/plotmath.html">plotmath</a></code> for another use of ‘symbol’. </p> <h3>Examples</h3> <pre> an <- as.name("arrg") is.name(an) # TRUE mode(an) # name typeof(an) # symbol </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>