dsplinefun: Wrapper of 'stats::splinefun' to generate densities and...

Description Usage Arguments Value

Description

dsplinefun applies splinefun to generate an interpolation function with splines, but it limits the output of the resulting interpolation function to values between 0 and 1 to match the behavior of the density and distribution of probabilities functions.

Usage

1

Arguments

...

Any parameters required by splinefun function to specify the spline interpolation. Typically, this includes the x, y coordinates of the data points.

Value

returns a function with formal arguments x and deriv, the latter defaulting to zero. This function can be used to evaluate the interpolating cubic spline (deriv = 0), or its derivatives (deriv = 1, 2, 3) at the points x, where the spline function interpolates the data points originally specified.


juliosergio/spitools documentation built on May 24, 2019, 5:01 a.m.