mono_Hermite_spline {distfromq} | R 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 |
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.