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