distributional, compositional, counts or
varietalCalculate the dissimilarity matrix between two datasets of class
distributional or compositional using the Kolmogorov-Smirnov,
Sircombe-Hazelton, Aitchison or Bray-Curtis distance
diss(x, method, ...)# S3 method for distributional
diss(x, method = NULL, log = FALSE, verbose = FALSE, ...)
# S3 method for compositional
diss(x, method = NULL, ...)
# S3 method for counts
diss(x, method = NULL, ...)
# S3 method for varietal
diss(x, method = NULL, ...)
an object of class diss
an object of class distributional,
compositional or counts
if x has class distributional: either
"KS", "Wasserstein", "Kuiper" or
"SH";
if x has class compositional: either
"aitchison" or "bray";
if x has class counts: either "chisq" or
"bray";
if x has class varietal: either "KS",
"W2_1D" or "W2".
optional arguments
logical. If TRUE, subjects the distributional
data to a logarithmic transformation before calculating the
Wasserstein distance.
logical. If TRUE, gives progress updates
during the construction of the dissimilarity matrix.
"KS" stands for the Kolmogorov-Smirnov statistic,
"W2_1D" for the 1-dimensional Wasserstein-2 distance,
"Kuiper" for the Kuiper statistic, "SH" for the
Sircombe-Hazelton distance, "aitchison" for the
Aitchison logratio distance, "bray" for the Bray-Curtis
distance, "chisq" for the Chi-square distance, and "W2"
for the 2-dimensional Wasserstein-2 distance.
KS.diss bray.diss SH.diss Wasserstein.diss Kuiper.diss
data(Namib)
print(round(100*diss(Namib$DZ)))
Run the code above in your browser using DataLab