EVOLUTION-MANAGER
Edit File: AsIs.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: Inhibit Interpretation/Conversion of Objects</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 AsIs {base}"><tr><td>AsIs {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Inhibit Interpretation/Conversion of Objects</h2> <h3>Description</h3> <p>Change the class of an object to indicate that it should be treated ‘as is’. </p> <h3>Usage</h3> <pre> I(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object</p> </td></tr> </table> <h3>Details</h3> <p>Function <code>I</code> has two main uses. </p> <ul> <li><p> In function <code><a href="data.frame.html">data.frame</a></code>. Protecting an object by enclosing it in <code>I()</code> in a call to <code>data.frame</code> inhibits the conversion of character vectors to factors and the dropping of names, and ensures that matrices are inserted as single columns. <code>I</code> can also be used to protect objects which are to be added to a data frame, or converted to a data frame <em>via</em> <code><a href="as.data.frame.html">as.data.frame</a></code>. </p> <p>It achieves this by prepending the class <code>"AsIs"</code> to the object's classes. Class <code>"AsIs"</code> has a few of its own methods, including for <code>[</code>, <code>as.data.frame</code>, <code>print</code> and <code>format</code>. </p> </li> <li><p> In function <code><a href="../../stats/html/formula.html">formula</a></code>. There it is used to inhibit the interpretation of operators such as <code>"+"</code>, <code>"-"</code>, <code>"*"</code> and <code>"^"</code> as formula operators, so they are used as arithmetical operators. This is interpreted as a symbol by <code>terms.formula</code>. </p> </li></ul> <h3>Value</h3> <p>A copy of the object with class <code>"AsIs"</code> prepended to the class(es). </p> <h3>References</h3> <p>Chambers, J. M. (1992) <em>Linear models</em>. Chapter 4 of <em>Statistical Models in S</em> eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="data.frame.html">data.frame</a></code>, <code><a href="../../stats/html/formula.html">formula</a></code> </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>