Description Usage Arguments Value Examples
Computes the weighted distance between two compositions
Computes the weighted distance between two compositions
1 2 3 |
x1 |
first composition |
x2 |
second composition |
w |
vector of weights |
w |
vector of weights |
x1 |
first composition |
x2 |
second composition |
a value with the weighted distance between x1 and x2
a value with the weighted distance between x1 and x2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Build compositional vectors
x1 <- prop.table(runif(10))
x2 <- prop.table(runif(10))
# Vector of weights
w <- c(rep(1,4),3,3,rep(1,4))
# The distance
w.dist(w,x1,x2)
# Build compositional vectors
x1 <- prop.table(runif(10))
x2 <- prop.table(runif(10))
# Vector of weights
w <- c(rep(1,4),3,3,rep(1,4))
# The distance
w.dist(w,x1,x2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.