dist2Dmatrix: Distance matrix computation

View source: R/AuxiliaryFunctions_USER.R

dist2DmatrixR Documentation

Distance matrix computation

Description

It computes the Euclidean distance matrix for a set of coordinates.

Usage

dist2Dmatrix(coords)

Arguments

coords

2D spatial coordinates of dimensions n\times 2.

Value

An n\times n distance matrix.

Author(s)

Katherine L. Valeriano, Alejandro OrdoƱez, Christian E. Galarza, and Larissa A. Matos.

Examples

n = 100
set.seed(1000)
x = round(runif(n,0,10), 5)     # X coordinate
y = round(runif(n,0,10), 5)     # Y coordinate
Mdist = dist2Dmatrix(cbind(x, y))

RcppCensSpatial documentation built on June 28, 2022, 1:07 a.m.