dist2Dmatrix: Distance Matrix Computation

Description Usage Arguments Value Author(s) Examples

View source: R/AuxiliaryFunctions_USER.R

Description

This function computes the Euclidean distance matrix for a set of coordinates.

Usage

1
dist2Dmatrix(coords)

Arguments

coords

2D spatial coordinates.

Value

The function returns the n x n distance matrix.

Author(s)

Katherine L. Valeriano, Alejandro Ordonez, Christian E. Galarza and Larissa A. Matos.

Examples

1
2
3
4
5
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 Sept. 21, 2021, 5:07 p.m.