Description Usage Arguments Value
prop
calculates the proportion of observations by group.
This is analaguous to count
which counts the number of
rows by group. Alternatively, count
is to table
as prop
is to prop.table
.
1 2 3 |
x |
A |
wt |
If omitted, will the number of rows. If specified, will perform a "weighted" proportion by summing the (non-missing) values of variable |
sort |
If |
vars, ... |
Variables to group by |
A tbl
with the grouping variables and column .prop
with the
proportion in each group.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.