Euclidean distance matrix

Share:

Description

Computes the inter-site Euclidean distance matrix for one or two sets of points.

Usage

1
 iDist(coords.1, coords.2, ...)

Arguments

coords.1

an nxp matrix with each row corresponding to a point in p dimensional space.

coords.2

an mxp matrix with each row corresponding to a point in p dimensional space. If this is missing then coords.1 is used.

...

currently no additional arguments.

Value

The nxn or nxm inter-site Euclidean distance matrix.

Author(s)

Andrew O. Finley finleya@msu.edu,
Sudipto Banerjee sudiptob@biostat.umn.edu,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
n <- 10
p1 <- cbind(runif(n),runif(n))

m <- 5
p2 <- cbind(runif(m),runif(m))

D <- iDist(p1, p2)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.