View source: R/pretty_condprob.R
pretty_condprob | R Documentation |
This function takes a dataframe and adds a variable of row numbers. This is the simplest function that does not take into account any group structures.
pretty_condprob( df, A_var, A_val, B_var, B_val, output = "string", digits = 1, percent = TRUE )
df |
Input dataframe. |
A_var |
The A variable in "the conditional probability of A given B." |
A_val |
Value of A variable in interest. |
B_var |
The B variable in "the conditional probability of A given B." |
B_val |
Value of B variable in interest. |
output |
Whether to print a numeric number or a statement. If the argument is "string", the function prints a message containing the conditional probability. Defaults to "string." |
digits |
The digit of the final output. Defaults to 1. |
percent |
Whether to display the conditional probability in a percentage. Defaults to TRUE.#' |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.