point_along: Point along

Description Usage Arguments Value Examples

View source: R/point_along.R

Description

Find a point along a path

Usage

1
point_along(d, x, y)

Arguments

d

linear distance of the researched point along the path from the first point.

x

vector of the x-position of the points along the path.

y

vector of the y-position of the points along the path.

Value

vector of (x,y) coordinates of the reasearch point. Returns extremities if the distance in negative or null, or too long.

Examples

1
2
3
4
5
6
7
8
9
x <- c(1,1,1,2,2)
y <- 1:5

d <- 1
point_along(d, x, y)
d <- 4.123
point_along(d, x, y)
d <- 5
point_along(d, x, y)

Clement-Viguier/ggriverlab documentation built on Nov. 8, 2019, 10:02 p.m.