cubic_spline: Get cubic spline between coordinates

View source: R/main.R

cubic_splineR Documentation

Get cubic spline between coordinates

Description

Given a set of x,y coordinates, calculate the cubic spline that goes through all points. The solution is returned at a specified set of x-coordinates, which must be contained within the input x-coordinates. Both input and output x-coordinates must be increasing (i.e. the spline cannot double back).

Usage

cubic_spline(x, y, x_pred)

Arguments

x, y

coordinates of points

x_pred

x-coordinates at which to calculate cubic spline.


bobverity/bobfunctions2 documentation built on July 4, 2023, 8:55 p.m.