Description Usage Arguments Value See Also Examples
This calculates shannon entropy of a variable in a tibble. It's assumed these columns are character typed with no NAs.
1 | shannon_entropy(.data, X, na.rm = FALSE)
|
.data |
A tibble with the column of interest |
X |
Name of the column |
na.rm |
remove all rows with NA values in at least one of the columns |
a double with the calculated value
shannon_cond_entropy
1 2 3 4 | shannon_entropy(iris, Species)
iris %>% as_tibble() %>% shannon_entropy(Species)
shannon_entropy(iris, 'Species')
shannon_entropy(iris, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.