EVOLUTION-MANAGER
Edit File: is.language.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: Is an Object a Language Object?</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 is.language {base}"><tr><td>is.language {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Is an Object a Language Object?</h2> <h3>Description</h3> <p><code>is.language</code> returns <code>TRUE</code> if <code>x</code> is a variable <code><a href="name.html">name</a></code>, a <code><a href="call.html">call</a></code>, or an <code><a href="expression.html">expression</a></code>. </p> <h3>Usage</h3> <pre> is.language(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object to be tested.</p> </td></tr> </table> <h3>Note</h3> <p>A <code>name</code> is also known as ‘symbol’, from its type (<code><a href="typeof.html">typeof</a></code>), see <code><a href="name.html">is.symbol</a></code>. </p> <p>If <code><a href="typeof.html">typeof</a>(x) == "language"</code>, then <code>is.language(x)</code> is always true, but the reverse does not hold as expressions or names <code>y</code> also fulfill <code>is.language(y)</code>, see the examples. </p> <p>This is a <a href="Primitive.html">primitive</a> function. </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>Examples</h3> <pre> ll <- list(a = expression(x^2 - 2*x + 1), b = as.name("Jim"), c = as.expression(exp(1)), d = call("sin", pi)) sapply(ll, typeof) sapply(ll, mode) stopifnot(sapply(ll, is.language)) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>