interpolate_opts | R Documentation |
Creates and interpolation options object for use with alembic()
.
interpolate_opts(fun, kind = c("point", "integral"), ...)
fun |
a function |
kind |
a string; either "point" or "integral". How to interpret the x, y values being interpolated. Either as point observations of a function OR as the integral of the function over the interval. |
... |
arbitrary other arguments, but checked against signature of |
This method creates the interpolation object for use with alembic()
; this
is a convenience method, which does basic validation on arguments and ensures
the information used in alembic()
to do interpolation is available.
The ...
arguments will be provided to fun
when it is invoked to
interpolate the tabular "functional" form of arguments to alembic()
. If
fun
has an argument kind
, that parameter will also be passed when
invoking the function; if not, then the input data will be transformed to
\{x, z\}
pairs, such that x_{i+1}-x_{i} * z_i = y_i
- i.e., transforming to
a point value and a functional form which is assumed constant until the next
partition.
a list, with fun
and kind
keys, as well as whatever other valid
keys appear in ...
.
interpolate_opts(
fun = stats::splinefun, method = "natural", kind = "point"
)
interpolate_opts(
fun = stats::approxfun, method = "constant", yleft = 0, yright = 0,
kind = "integral"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.