L1.dist | R Documentation |

Apply the L1 distance function to two scores.

```
L1.dist(x, y, range)
```

`x` |
a score. |

`y` |
a score. |

`range` |
the range of the scores, i.e., the difference between the maximum score and the minimum score. |

This function applies the L1 distance function to two scores. This is an appropriate distance function for ordinal data.

`|x - y| / r`

, where `r`

is the range of the scores; or `NA`

if either score is `NA`

.

`discrete.dist`

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.