prop_if | R Documentation |
This function calculates the proportion of TRUE values in a logical vector, with an option to remove missing values.
prop_if(x, na_rm = FALSE)
x |
A logical vector. |
na_rm |
Logical flag indicating whether to remove NA values before calculating the proportion (default is false). |
A numeric value representing the proportion of TRUE values in the vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.