Simple wrapper to calculate the Dice Coefficient/Similarity Index
from a table
dicer(tab, verbose = TRUE)
Arguments
tab |
table or matrix that is 2 by 2 |
verbose |
should the Dice be printed before returned? |
Value
Numeric scalar (one number)
Examples
tab = matrix(c(1000, 20, 20, 400), ncol = 2)
dicer(tab)
#> [1] 0.952381
#> [1] 0.952381