View source: R/SDS100_get_statistics.R
get_proportion | R Documentation |
Calculates proportion of values in a particular category
get_proportion(v, category_name)
v |
A vector of categorical data. |
category_name |
A string specifying the name of a category. The proportion of values in that category will be returned. |
set.seed(100)
sprinkle_sample <- get_sprinkle_sample(100)
get_proportion(sprinkle_sample, "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.