Description Usage Arguments Value Note Author(s)
Calculates all distances from a given vector to the rows of a matrix.
1 |
x |
A vector containing the data point to be compared to data. |
data |
A matrix containing the data points to be compared with x. |
defined |
A vector of the same length as x and the rows of data, containing 1 for all columns of the data to be compared and any other value for columns to be discarded. |
distance |
A string marking, which distance measure is to be used. Euclidean by default. |
distToAll |
A vector containing the distances from x to all rows of data. |
This function is very inefficient for large Data! For euclidean distance form a given vector to the rows of a matrix use dist2AllEuclid instead.
Raphael Paebst
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.