is_euclid: Test if the distance matrix is euclidean.

Description Usage Arguments Author(s) Examples

View source: R/multivariate.R

Description

Actually a simplified version of the ADE4 implementation (is.euclid).

Usage

1
is_euclid(distances, tol = 1e-07)

Arguments

distances

an object of class 'dist'

tol

a tolerance threshold : an eigenvalue is considered positive if it is larger than -tol*lambda1 where lambda1 is the largest eigenvalue.

Author(s)

Eric Coissac

Christelle Gonindard-Melodelima

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(vegan)
data(bacteria)

bacteria_rel_freq <- sweep(bacteria,
                           1,
                           rowSums(bacteria),
                           "/")

bacteria_bray <- vegdist(bacteria_rel_freq,method = "bray")
is_euclid(bacteria_bray)

bacteria_chao <- vegdist(floor(bacteria*10000),method = "chao")
is_euclid(bacteria_chao)

ProcMod documentation built on May 12, 2021, 9:08 a.m.

Related to is_euclid in ProcMod...