step_interp_factory | R Documentation |
A factory that returns a function that performs linear interpolation, allowing for "steps" or discontinuities.
step_interp_factory(x, y, cont_dir = c("right", "left"), increasing = TRUE)
x |
numeric vector with the "horizontal axis" coordinates of the points to interpolate. |
y |
numeric vector with the "vertical axis" coordinates of the points to interpolate. |
cont_dir |
at steps or discontinuities, the direction from which the function is continuous. This will be "right" for a CDF or "left" for a QF. |
increasing |
boolean indicating whether the function is increasing or
decreasing. Only used in the degenerate case where there is only one unique
value of |
a function with argument x
that performs linear approximation of
the input data points.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.