EVOLUTION-MANAGER
Edit File: model_matrix.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 design matrix</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 model_matrix {modelr}"><tr><td>model_matrix {modelr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Construct a design matrix</h2> <h3>Description</h3> <p>This is a thin wrapper around <code><a href="../../stats/html/model.matrix.html">stats::model.matrix()</a></code> which returns a tibble. Use it to determine how your modelling formula is translated into a matrix, an thence into an equation. </p> <h3>Usage</h3> <pre> model_matrix(data, formula, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>data</code></td> <td> <p>A data frame</p> </td></tr> <tr valign="top"><td><code>formula</code></td> <td> <p>A modelling formula</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other arguments passed onto <code><a href="../../stats/html/model.matrix.html">stats::model.matrix()</a></code></p> </td></tr> </table> <h3>Value</h3> <p>A tibble. </p> <h3>Examples</h3> <pre> model_matrix(mtcars, mpg ~ cyl) model_matrix(iris, Sepal.Length ~ Species) model_matrix(iris, Sepal.Length ~ Species - 1) </pre> <hr /><div style="text-align: center;">[Package <em>modelr</em> version 0.1.8 <a href="00Index.html">Index</a>]</div> </body></html>