Computes the Bray-Curtis turnover between two matrices.

bray_curtis_turnover(A, B)

Arguments

A

A numeric matrix of size N x p.

B

A numeric matrix of size M x p.

Value

A turnover matrix of size N x M.

Examples

A <- matrix(c(1, 0, 1, 0, 1, 1), nrow = 2, ncol = 3)
B <- matrix(c(0, 1, 1, 1, 0, 1), nrow = 2, ncol = 3)
bray_curtis_turnover(A, B)
#>           [,1]      [,2]
#> [1,] 0.6666667 0.0000000
#> [2,] 1.0000000 0.6666667