EVOLUTION-MANAGER
Edit File: NULL.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: The Null 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 NULL {base}"><tr><td>NULL {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Null Object</h2> <h3>Description</h3> <p><code>NULL</code> represents the null object in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>: it is a <a href="Reserved.html">reserved</a> word. <code>NULL</code> is often returned by expressions and functions whose value is undefined. </p> <h3>Usage</h3> <pre> NULL as.null(x, ...) is.null(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object to be tested or coerced.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>ignored.</p> </td></tr> </table> <h3>Details</h3> <p><code>NULL</code> can be indexed (see <a href="Extract.html">Extract</a>) in just about any syntactically legal way: whether it makes sense or not, the result is always <code>NULL</code>. Objects with value <code>NULL</code> can be changed by replacement operators and will be coerced to the type of the right-hand side. </p> <p><code>NULL</code> is also used as the empty <a href="list.html">pairlist</a>: see the examples. Because pairlists are often promoted to lists, you may encounter <code>NULL</code> being promoted to an empty list. </p> <p>Objects with value <code>NULL</code> cannot have attributes as there is only one null object: attempts to assign them are either an error (<code><a href="attr.html">attr</a></code>) or promote the object to an empty list with attribute(s) (<code><a href="attributes.html">attributes</a></code> and <code><a href="structure.html">structure</a></code>). </p> <h3>Value</h3> <p><code>as.null</code> ignores its argument and returns <code>NULL</code>. </p> <p><code>is.null</code> returns <code>TRUE</code> if its argument's value is <code>NULL</code> and <code>FALSE</code> otherwise. </p> <h3>Note</h3> <p><code>is.null</code> 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> is.null(list()) # FALSE (on purpose!) is.null(pairlist()) # TRUE is.null(integer(0)) # FALSE is.null(logical(0)) # FALSE as.null(list(a = 1, b = "c")) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>