View source: R/vector_length.R

vector_length | R Documentation |

A vector given by two points in a plane.

```
vector_length(p1, p2 = c(0, 0))
```

`p1` |
The first point (x, y). |

`p2` |
The second point (x, y). |

The length of the vector.

Other geometry functions:
`get_intersection()`

,
`points2equation()`

```
p1 <- c(0, 4)
vector_length(p1)
p2 <- c(3, 4)
vector_length(p1, p2)
```

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.