| manhat | R Documentation |
manhat computes the Manhattan distance between two vectors.
Specify either two individual vectors or a data frame/matrix and two pertinent row names as input.
manhat(v1, v2, data = NULL)
v1 |
Either an individual vector or a row name of |
v2 |
Either an individual vector or a row name of |
data |
A data frame object or matrix. |
D. Schmitz
### two individual vectors
var01 <- runif(n = 50, min = 1, max = 10)
var02 <- runif(n = 50, min = 1, max = 10)
manhat(var01, var02)
### data frame
data("gdsm_df")
manhat("var03", "var04", gdsm_df)
### matrix
data("gdsm_mat")
manhat("var05", "var06", gdsm_mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.