Description Usage Arguments Details Value Author(s) Examples

Finds the Manhattan distance between two vectors x and y, or the vector x and the matrix y

1 | ```
distancia1(x, y)
``` |

`x` |
A numeric vector |

`y` |
A numeric vector or matrix |

Does not support missing values.

`distancia` |
The result is a numeric value representing the Manhattan distance between x and y, or a row matrix representing the Euclidean distance between x and each row of y. |

Edgar Acuna

1 2 3 4 5 | ```
#---- Calculating distances
x=rnorm(4)
y=matrix(rnorm(12),4,3)
distancia1(x,y[,1])
distancia1(x,y)
``` |

dprep documentation built on May 19, 2017, 8:13 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.