point_on: Point on

Description Usage Arguments Examples

View source: R/point_on.R

Description

Find the coordinates of a point to a flight linear distance from the first point of the path.

Usage

1
point_on(d, x, y)

Arguments

d

distance to 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.

Examples

1
2
3
4
5
x <- sort(floor(runif(10)*100)/20)
y <- sort(floor(runif(10)*100)/20)
d <- mean(x)
point <- point_on(d, x, y)
ggplot(data.frame(x,y), aes(x,y)) + geom_path() + geom_point(data= data.frame(x = point[1], y = point[2]))

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