EVOLUTION-MANAGER
Edit File: prop.table.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: Express Table Entries as Fraction of Marginal Table</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 prop.table {base}"><tr><td>prop.table {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Express Table Entries as Fraction of Marginal Table</h2> <h3>Description</h3> <p>This is really <code>sweep(x, margin, margin.table(x, margin), "/")</code> for newbies, except that if <code>margin</code> has length zero, then one gets <code>x/sum(x)</code>. </p> <h3>Usage</h3> <pre> prop.table(x, margin = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> table </p> </td></tr> <tr valign="top"><td><code>margin</code></td> <td> <p> index, or vector of indices to generate margin for</p> </td></tr> </table> <h3>Value</h3> <p>Table like <code>x</code> expressed relative to <code>margin</code> </p> <h3>Author(s)</h3> <p> Peter Dalgaard </p> <h3>See Also</h3> <p><code><a href="margin.table.html">margin.table</a></code></p> <h3>Examples</h3> <pre> m <- matrix(1:4, 2) m prop.table(m, 1) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>