points2line {SpatialRDD}R Documentation

Convert borderpoints to a line

Description

Small function that connects dots and makes them one line which can later be used as a cutoff for the RD.

Usage

points2line(borderpoints, crs)

Arguments

borderpoints

a set of points on a boundary

crs

set the coordinate reference system (CRS)

Value

a line as an sf object

Examples

points_samp.sf <- sf::st_sample(polygon_full, 2) # create points
# make it an sf object bc st_sample only created the geometry list-column (sfc):
points_samp.sf <- sf::st_sf(points_samp.sf)
points2line(points_samp.sf, crs = sf::st_crs(points_samp.sf))


[Package SpatialRDD version 0.1.0 Index]