mono_Hermite_spline: Create a polySpline object representing a monotonic Hermite...

View source: R/int.R

mono_Hermite_splineR Documentation

Create a polySpline object representing a monotonic Hermite spline interpolating a given set of points.

Description

Create a polySpline object representing a monotonic Hermite spline interpolating a given set of points.

Usage

mono_Hermite_spline(x, y, m)

Arguments

x

vector giving the x coordinates of the points to be interpolated.

y

vector giving the y coordinates of the points to be interpolated. Must be increasing or decreasing for 'method = "hyman"'.

m

(for 'splinefunH()') vector of slopes m_i at the points (x_i,y_i); these together determine the Hermite “spline” which is piecewise cubic, (only) once differentiable continuously.

Details

This function essentially reproduces stats::splinefunH, but it returns a polynomial spline object as used in the splines package rather than a function that evaluates the spline, and potentially makes adjustments to the input slopes m to enforce monotonicity.

Value

An object of class polySpline with the spline object, suitable for use with other functionality from the splines package.


distfromq documentation built on Sept. 14, 2024, 1:07 a.m.