Description Usage Arguments Value See Also Examples
Calculate the sample proportion of "Yes" responses in the specified variable.
1 | percent_hungry(data_frame, yes_no_variable)
|
data_frame |
A tidy representation of the data, in which each row represents a response. |
yes_no_variable |
A "quosure" object specifying the variable that contains the "Yes" and "No" responses to be tallied. This should be passed as the form quo(varname). |
The proportion of "Yes" responses in yes_no_variable in data_Frame.
quo for examples of how to quote variable names
1 2 | df <- data.frame(foo=c(1,2,3), bar=c("Yes", "No", "Yes"))
percent_hungry(df, dplyr::quo(bar))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.