w.dist: Computes the weighted distance between two compositions

Description Usage Arguments Value Examples

Description

Computes the weighted distance between two compositions

Computes the weighted distance between two compositions

Usage

1
2
3
w.dist(x1, x2)

w.dist(x1, x2)

Arguments

x1

first composition

x2

second composition

w

vector of weights

w

vector of weights

x1

first composition

x2

second composition

Value

a value with the weighted distance between x1 and x2

a value with the weighted distance between x1 and x2

Examples

 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)

UVic-omics/CoDA-wKMR documentation built on Oct. 31, 2019, 12:56 a.m.