Description Usage Arguments Value Examples
This calculates the mutual information between two variables in a tibble. (if normalized). It's assumed these columns are character typed with no NAs.
1 | mutual_info(.data, ..., normalized = FALSE, na.rm = FALSE)
|
.data |
A tibble with the column of interest |
... |
two columns (variables) selected |
normalized |
if TRUE, scale from 0 to 1 |
na.rm |
remove all rows with NA values in at least one of the columns |
a double with the calculated value
1 2 3 4 5 6 | # make an all-character version of mtchars
mt_tib <- as_tibble(mtcars) %>% mutate_all(as.character)
mutual_info(mt_tib, vs, am)
mutual_info(mt_tib, 'am', 'vs')
mutual_info(mt_tib, vs, am, normalized=TRUE)
mutual_info(mt_tib, starts_with('c'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.