Description Usage Arguments Value Examples
Return the distance matrix.
1 |
X |
Coordinates data.frame |
distance matrix
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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.