is_euclid {ProcMod} | R Documentation |
Test if the distance matrix is euclidean.
Description
Actually a simplified version of the ADE4 implementation
(is.euclid
).
Usage
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
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)
[Package ProcMod version 1.0.8 Index]