EVOLUTION-MANAGER
Edit File: terms.formula.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: Construct a terms Object from a Formula</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 terms.formula {stats}"><tr><td>terms.formula {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Construct a terms Object from a Formula</h2> <h3>Description</h3> <p>This function takes a formula and some optional arguments and constructs a terms object. The terms object can then be used to construct a <code><a href="model.matrix.html">model.matrix</a></code>. </p> <h3>Usage</h3> <pre> ## S3 method for class 'formula' terms(x, specials = NULL, abb = NULL, data = NULL, neg.out = TRUE, keep.order = FALSE, simplify = FALSE, ..., allowDotAsName = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a formula.</p> </td></tr> <tr valign="top"><td><code>specials</code></td> <td> <p>which functions in the formula should be marked as special in the <code>terms</code> object? A character vector or <code>NULL</code>.</p> </td></tr> <tr valign="top"><td><code>abb</code></td> <td> <p>Not implemented in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </td></tr> <tr valign="top"><td><code>data</code></td> <td> <p>a data frame from which the meaning of the special symbol <code>.</code> can be inferred. It is unused if there is no <code>.</code> in the formula.</p> </td></tr> <tr valign="top"><td><code>neg.out</code></td> <td> <p>Not implemented in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </td></tr> <tr valign="top"><td><code>keep.order</code></td> <td> <p>a logical value indicating whether the terms should keep their positions. If <code>FALSE</code> the terms are reordered so that main effects come first, followed by the interactions, all second-order, all third-order and so on. Effects of a given order are kept in the order specified.</p> </td></tr> <tr valign="top"><td><code>simplify</code></td> <td> <p>should the formula be expanded and simplified, the pre-1.7.0 behaviour?</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>further arguments passed to or from other methods.</p> </td></tr> <tr valign="top"><td><code>allowDotAsName</code></td> <td> <p>normally <code>.</code> in a formula refers to the remaining variables contained in <code>data</code>. Exceptionally, <code>.</code> can be treated as a name for non-standard uses of formulae.</p> </td></tr> </table> <h3>Details</h3> <p>Not all of the options work in the same way that they do in S and not all are implemented. </p> <h3>Value</h3> <p>A <code><a href="terms.object.html">terms.object</a></code> object is returned. The object itself is the re-ordered (unless <code>keep.order = TRUE</code>) formula. In all cases variables within an interaction term in the formula are re-ordered by the ordering of the <code>"variables"</code> attribute, which is the order in which the variables occur in the formula. </p> <h3>See Also</h3> <p><code><a href="terms.html">terms</a></code>, <code><a href="terms.object.html">terms.object</a></code> </p> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>