Description Usage Arguments Value Author(s) See Also Examples
This is really sweep(x, margin, margin.table(x, margin), "/")
for newbies, except that if margin
has length zero, then one
gets x/sum(x)
.
1 | prop.table(x, margin = NULL)
|
x |
table |
margin |
index, or vector of indices to generate margin for |
Table like x
expressed relative to margin
Peter Dalgaard
1 2 3 | m <- matrix(1:4, 2)
m
prop.table(m, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.