EVOLUTION-MANAGER
Edit File: add_margins.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: Add margins to a data frame.</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 add_margins {reshape2}"><tr><td>add_margins {reshape2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add margins to a data frame.</h2> <h3>Description</h3> <p>Rownames are silently stripped. All margining variables will be converted to factors. </p> <h3>Usage</h3> <pre> add_margins(df, vars, margins = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>df</code></td> <td> <p>input data frame</p> </td></tr> <tr valign="top"><td><code>vars</code></td> <td> <p>a list of character vectors giving the variables in each dimension</p> </td></tr> <tr valign="top"><td><code>margins</code></td> <td> <p>a character vector of variable names to compute margins for. <code>TRUE</code> will compute all possible margins.</p> </td></tr> </table> <hr /><div style="text-align: center;">[Package <em>reshape2</em> version 1.4.4 <a href="00Index.html">Index</a>]</div> </body></html>