Wasserstein.diss | R Documentation |
Returns the Wasserstein distance between two samples
Wasserstein.diss(x, ...)
## Default S3 method:
Wasserstein.diss(x, y, ...)
## S3 method for class 'distributional'
Wasserstein.diss(x, log = FALSE, ...)
## S3 method for class 'varietal'
Wasserstein.diss(x, package = "transport", verbose = FALSE, ...)
x |
the first sample as a vector |
... |
optional arguments to the
|
y |
the second sample as a vector |
log |
logical. Take the lograthm of the data before calculating the distances? |
package |
the name of the package that provides the 2D
Wasserstein distance. Currently, this can be either
|
verbose |
logical. If |
a scalar value
The default S3 method was written by Pieter Vermeesch,
using modified code from Dominic Schuhmacher's transport
package (transport1d
function), as implemented in
IsoplotR
.
data(Namib)
print(Wasserstein.diss(Namib$DZ$x[['N1']],Namib$DZ$x[['T8']]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.