EVOLUTION-MANAGER
Edit File: is.recursive.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 Atomic or Recursive?</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.recursive {base}"><tr><td>is.recursive {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Is an Object Atomic or Recursive?</h2> <h3>Description</h3> <p><code>is.atomic</code> returns <code>TRUE</code> if <code>x</code> is of an atomic type (or <code>NULL</code>) and <code>FALSE</code> otherwise. </p> <p><code>is.recursive</code> returns <code>TRUE</code> if <code>x</code> has a recursive (list-like) structure and <code>FALSE</code> otherwise. </p> <h3>Usage</h3> <pre> is.atomic(x) is.recursive(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>Details</h3> <p><code>is.atomic</code> is true for the <a href="vector.html">atomic</a> types (<code>"logical"</code>, <code>"integer"</code>, <code>"numeric"</code>, <code>"complex"</code>, <code>"character"</code> and <code>"raw"</code>) and <code>NULL</code>. </p> <p>Most types of objects are regarded as recursive. Exceptions are the atomic types, <code>NULL</code>, symbols (as given by <code><a href="name.html">as.name</a></code>), <code>S4</code> objects with slots, external pointers, and—rarely visible from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>—weak references and byte code, see <code><a href="typeof.html">typeof</a></code>. </p> <p>It is common to call the atomic types ‘atomic vectors’, but note that <code><a href="vector.html">is.vector</a></code> imposes further restrictions: an object can be atomic but not a vector (in that sense). </p> <p>These are <a href="Primitive.html">primitive</a> functions. </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="list.html">is.list</a></code>, <code><a href="is.language.html">is.language</a></code>, etc, and the <code>demo("is.things")</code>. </p> <h3>Examples</h3> <pre> require(stats) is.a.r <- function(x) c(is.atomic(x), is.recursive(x)) is.a.r(c(a = 1, b = 3)) # TRUE FALSE is.a.r(list()) # FALSE TRUE - a list is a list is.a.r(list(2)) # FALSE TRUE is.a.r(lm) # FALSE TRUE is.a.r(y ~ x) # FALSE TRUE is.a.r(expression(x+1)) # FALSE TRUE is.a.r(quote(exp)) # FALSE FALSE </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>