pairwise_dist: Calculate pairwise distances

Description Usage Arguments Details Value Examples

View source: R/basis_mat.r

Description

Calculates pairwise distances between two sets of locations.

Usage

1
2
pairwise_dist(coords1, coords2 = coords1, dmethod = SpatialTools::dist2,
  ...)

Arguments

coords1

the coordinates of the first set of locations (dimension n1 x p).

coords2

the coordinates of the second set of locations (dimension n2 x p).

dmethod

the type of distance to compute, see Details.

...

space for additional arguments

Details

This function is a wrapper for existing distance functions. Argument dmethod selects from two types of distances to be computed:

Value

A vector of matrix containing distances between the points.

Examples

1
2
3
coords1 <- cbind( c(1,1,2) , c(1,2,1) )
coords2 <- cbind( c(3,3) , c(2,3) )
pairwise_dist( coords1, coords2 )

jelsema/RRSM documentation built on May 19, 2019, 4:02 a.m.