calc_angle: Function to get the heading angle between two points:

Description Usage Arguments Examples

View source: R/trial_geom.R

Description

This take in any two point features of class 'sf' and returns heading angle between the two points:

Usage

1
calc_angle(x, y)

Arguments

x

point feature of class 'sf'

y

point feature of class 'sf'

Examples

1
2
3
4
5
6
7
8
## Not run: 

points <- sf::read_sf("data/Points.gpkg")
x <- sf::st_coordinates(points[1, 4])
y <- sf::st_coordinates(points[2, 4])

## End(Not run)
calc_angle(x, y)

RodrigoAgronomia/PAR documentation built on Jan. 19, 2020, 8:51 p.m.