CalcHellingerDist.Rd
Calculates the Hellinger distances or the rows or columns of a numeric matrix or for two numeric vectors.
CalcHellingerDist(x, y = NULL, by_rows = TRUE)
x | A numeric matrix or numeric vector |
---|---|
y | A numeric vector. |
by_rows | Logical. If |
If x
is a matrix, this returns an square and symmetric matrix.
The i,j entries correspond to the Hellinger Distance between the rows of x
(or the columns of x
if by_rows = FALSE
). If x
and y
are vectors, this returns a numeric scalar whose value is the Hellinger Distance
between x
and y
.
#> [1] 0.1580238#> x y #> x 0.0000000 0.1580238 #> y 0.1580238 0.0000000