`R/geometry_predicates.R`

`in_order.Rd`

If points are collinear it is possible to ask whether they are ordered along the common line. This function is not strict, i.e. it is possible for the middle point to coincide with either the first or last point and still be regarded as ordered between them. This functionality comes in two versions, one that access orderedness between three vectors of points and one that assess it along a single vector. Note that for the later version the return value is 2 elements shorter than the input vector.

```
in_order(x, y, z)
in_order_along(x)
```

- x, y, z
Vectors of points

A logical vector

Other Predicates:
`collinear()`

,
`constant_in`

,
`geometry_class`

,
`geometry_turns`

,
`has_intersection()`

,
`is_degenerate()`

,
`location_predicates`

,
`parallel()`

```
p <- point(1:30, 1:30)
p <- p[sample(30)]
in_order(p[1:10], p[11:20], p[21:30])
#> [1] FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
in_order_along(p)
#> [1] FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE
#> [13] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE
#> [25] TRUE FALSE FALSE FALSE
```