| add_prop | R Documentation |
Use prop.table() to add a proportion column to a dplyr::count() tibble.
add_prop(.data, n, sum = FALSE)
.data |
A data frame with a count column. |
n |
The column name with a count, usually |
sum |
Should |
mean(x %in% y)
A data frame with the new column p.
add_prop(dplyr::count(ggplot2::diamonds, cut))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.