euclidean: Calculate the Euclidean distance between two distance...

View source: R/between_dist.R

euclideanR Documentation

Calculate the Euclidean distance between two distance matrices.

Description

This function computes the Euclidean distance between the lower triangular parts of two given matrices.

Usage

euclidean(mat1, mat2)

Arguments

mat1

A numeric matrix.

mat2

A numeric matrix.

Value

A numeric value representing the Euclidean distance between the lower triangular parts of mat1 and mat2.

Examples

mat1 <- matrix(c(1, 2, 3, 4), 2, 2)
mat2 <- matrix(c(4, 3, 2, 1), 2, 2)
euclidean(mat1, mat2)

mixtree documentation built on April 3, 2025, 8:01 p.m.