| textDistMatrix | R Documentation |
Calculate a distance matrix for a numeric matrix, using the textDist
function. It is used to calculate the text distance between all combinations
of the columns of the matrix M.
textDistMatrix(M, zeroes = 0.5)
M |
A numeric matrix |
zeroes |
Text distance when both vectors are zero vectors; default is .5 |
The text distance matrix with the text distance between all
combinations of the columns of M. This will give the same result as
the function distMatrix when run with its default distance function
"textDist"; however, for large matrices textDistMatrix is much more
efficient. In addition, for very large matrices distMatrix may not run,
while textDistMatrix will.
M=matrix(c(0,1,0,2,0,10,0,14,12,0,8,0,1,0,1,0),4)
colnames(M)=1:4;rownames(M)=c("A","B","C","D")
M
#Text distance matrix
textDistMatrix(M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.