distance | R Documentation |
This function computes distances for two sets of inputs and returns
a R
object.
distance(input1, input2, type = "isotropic", dtype = "Euclidean")
input1 |
a matrix of inputs |
input2 |
a matrix of inputs |
type |
a string indicating the form of distances with three froms supported currently: isotropic, tensor, ARD. |
dtype |
a string indicating distance type: Euclidean, GCD, where the latter indicates great circle distance. |
a R object holding distances for two sets of inputs. If type is isotropic, a matrix of distances is returned; if type is tensor or ARD, a list of distance matrices along each input dimension is returned.
a numeric vector or matrix of distances
Pulong Ma mpulong@gmail.com
input = seq(0,1,length=20)
d = distance(input, input, type="isotropic", dtype="Euclidean")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.