smooth.spline.poly: whuber's spline.poly adapted to stats::smooth.spline

View source: R/spline.poly.R

smooth.spline.polyR Documentation

whuber's spline.poly adapted to stats::smooth.spline

Description

See: https://gis.stackexchange.com/a/24929

Usage

smooth.spline.poly(xy, k = 3, dof = 5, ...)

Arguments

xy

A data.frame with ordered X/Y pairs representing the polygon

k

The amount of points used to "close" the path, and prevent discontinuous derivatives at the end-points.

dof

The degrees of freedom used by stats::smooth.spline

Details

Splining a polygon with stats::smooth.spline

The rows of 'xy' give coordinates of the boundary vertices, in order. 'vertices' is the number of spline vertices to create. (Not all are used: some are clipped from the ends.) 'k' is the number of points to wrap around the ends to obtain a smooth periodic spline.

Value

Returns a data.frame of points.


gerbeldo/tidycell documentation built on Aug. 15, 2022, 2:35 p.m.