createD | R Documentation |
createD
constructs an n x k matrix of Euclidean distances from an n x p matrix
of attribute data. For each object, the distances to k randomly selected objects are
computed.
createD(x, k)
x |
n x p data matrix. |
k |
Number of distances. If missing, an n x n distance matrix is computed. |
A list with two elements:
n x k distance matrix.
n x k matrix of indices. D[i,j] is the Euclidean distance between x[i,] and x[J[i,j],].
kevclus
data(fourclass)
x<-as.matrix(fourclass[,1:2])
dist<-createD(x,k=10)
dim(dist$D)
dim(dist$J)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.