ccbhattacharyya | R Documentation |
This function takes a dataframe and a factor in input, and returns a matrix with the Bhattacharyya distances about it.
cbhattacharyya(
dataset,
formula,
plot = TRUE,
plot_title = "Bhattacharyya Distance Between Groups"
)
dataset |
A dataframe. |
formula |
A factor which you want to calculate the Bhattacharyya distances matrix. |
plot |
Logical, if TRUE, a plot of Bhattacharyya distances matrix is displayed. |
plot_title |
The title to be used for the plot if plot is TRUE. |
A matrix containing Bhattacharyya distances between each pair of groups and the plot.
# Example with the iris dataset
cbhattacharyya(iris, ~Species, plot = TRUE, plot_title = "Bhattacharyya Distance Between Groups")
# Example with the mtcars dataset
cbhattacharyya(mtcars, ~am, plot = TRUE, plot_title = "Bhattacharyya Distance Between Groups")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.