View source: R/NNCTFunctions.R
dist2full | R Documentation |
Converts a lower triangular distance matrix to a full distance matrix
with zeroes in the diagonal.
The input is usually the result of the dist
function
in the stats
package.
This function is adapted from Everitt's book
(\insertCiteeveritt:2004;textualnnspat)
dist2full(dis)
dis |
A lower triangular matrix,
resulting from the |
A square (symmetric) distance matrix with zeroes in the diagonal.
Elvan Ceyhan
dist
#3D data points
n<-3
X<-matrix(runif(3*n),ncol=3)
dst<-dist(X)
dist2full(dst)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.