distmatrix: Distance matrix

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/distmatrixfin.R

Description

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

Usage

1
distmatrix(coords)

Arguments

coords

2D spatial coordinates.

Value

dist

symetric matrix of distances between points.

Author(s)

Alejandro Ordonez <<[email protected]>>, Victor H. Lachos <<[email protected]>> and Christian E. Galarza <<[email protected]>>

Maintainer: Alejandro Ordonez <<[email protected]>>

References

Diggle, P. & Ribeiro, P. (2007). Model-Based Geostatistics. Springer Series in Statistics.

See Also

SAEMSCL

Examples

1
2
3
4
5
6
7
8
9
n<-200
n1=100

####Simulating spatial coordinates##
r1=sample(seq(1,30,length=400),n+n1)
r2=sample(seq(1,30,length=400),n+n1)
coords=cbind(r1,r2)

H=distmatrix(coords)

CensSpatial documentation built on May 30, 2017, 8:24 a.m.