distMat: Distance matrix

Description Usage Arguments Value Examples

View source: R/distMat.R

Description

Return the distance matrix.

Usage

1
distMat(X, ref, tb, tore = FALSE, toreBound = 0)

Arguments

X

Coordinates data.frame

Value

distance matrix

Examples

1
2
3
4
5
6
7
N <- 36
X <- as.matrix(expand.grid(1:sqrt(N),1:sqrt(N)))
N <- nrow(X)
tb = runif(2)/100
#f <- function(k,Xcoord,tore,toreBound){distUnitk(as.matrix(Xcoord),k =k,tore, toreBound)}
#system.time(do.call(cbind,lapply(X = 1:N,FUN = f,Xcoord = X,tore = TRUE,toreBound = sqrt(N))))
system.time(D <- distMat(X,ref = 1,tb,tore = TRUE,toreBound = sqrt(N)))

RJauslin/SystematicSampling documentation built on Feb. 10, 2021, 9:37 a.m.