tf_evaluate | R Documentation |
tf
-vectors for given argument valuesAlso used internally by the [
-operator for tf
data (see ?tfbrackets
) to
evaluate object
, see examples.
tf_evaluate(object, arg, ...)
## Default S3 method:
tf_evaluate(object, arg, ...)
## S3 method for class 'tfd'
tf_evaluate(object, arg, evaluator = tf_evaluator(object), ...)
## S3 method for class 'tfb'
tf_evaluate(object, arg, ...)
object |
a |
arg |
optional evaluation grid (vector or list of vectors).
Defaults to |
... |
not used |
evaluator |
optional. The function to use for inter/extrapolating the
|
A list of numeric vectors containing the function
evaluations on arg
.
Other tidyfun inter/extrapolation functions:
tf_approx_linear()
,
tf_interpolate()
f <- tf_rgp(3, arg = seq(0, 1, length.out = 11))
tf_evaluate(f) |> str()
tf_evaluate(f, arg = 0.5) |> str()
# equivalent, as matrix:
f[, 0.5]
new_grid <- seq(0, 1, length.out = 6)
tf_evaluate(f, arg = new_grid) |> str()
# equivalent, as matrix:
f[, new_grid]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.