| tf_approx_linear | R Documentation |
tfd-objectsThese are the currently available evaluator-functions for tfd-objects,
which control how the entries are inter-/extrapolated to previously unseen
arg-values. They all are merely wrappers around zoo::na.fill(),
zoo::na.approx(), etc... Note that these are not meant to be called directly –
they are internal functions used by tf_evaluate.tfd() to do its thing.
The list:
tf_approx_linear for linear interpolation without extrapolation (i.e.,
zoo::na.approx() with na.rm = FALSE) – this is the default,
tf_approx_spline for cubic spline interpolation, (i.e., zoo::na.spline()
with na.rm = FALSE),
tf_approx_none in order to not inter-/extrapolate ever (i.e., zoo::na.fill() with fill = NA)
tf_approx_fill_extend for linear interpolation and constant extrapolation
(i.e., zoo::na.fill() with fill = "extend")
tf_approx_locf for "last observation carried forward" (i.e.,
zoo::na.locf() with na.rm = FALSE and
tf_approx_nocb for "next observation carried backward" (i.e.,
zoo::na.locf() with na.rm = FALSE, fromLast = TRUE).
For implementing your own, see source code of tf:::zoo_wrapper.
tf_approx_linear(x, arg, evaluations)
tf_approx_spline(x, arg, evaluations)
tf_approx_none(x, arg, evaluations)
tf_approx_fill_extend(x, arg, evaluations)
tf_approx_locf(x, arg, evaluations)
tf_approx_nocb(x, arg, evaluations)
x |
new |
arg |
the |
evaluations |
the function values at |
a vector of values of the function defined by the given
(x_i, f(x_i))=(arg, evaluations)-tuples at new argument values x.
tfd
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Other tidyfun inter/extrapolation functions:
tf_evaluate(),
tf_interpolate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.