as.data.frame.tf {tf} | R Documentation |
Convert functional data back to tabular data formats
Description
Various converters to turn tfb
- or tfd
-vectors into data.frames or
matrices, or even an actual R function.
Usage
## S3 method for class 'tf'
as.data.frame(x, row.names = NULL, optional = FALSE, unnest = FALSE, ...)
## S3 method for class 'tf'
as.matrix(x, arg, interpolate = FALSE, ...)
## S3 method for class 'tf'
as.function(x, ...)
Arguments
x |
a |
row.names |
|
optional |
not used |
unnest |
if |
... |
additional arguments to be passed to or from methods. |
arg |
a vector of argument values / evaluation points for |
interpolate |
should functions be evaluated (i.e., inter-/extrapolated)
for values in |
Value
for as.data.frame.tf
: if unnest
is FALSE
(default), a
one-column data.frame
with a tf
-column containing x
. if unnest
is
TRUE
, a 3-column data frame with columns id
for the (unique) names of
x
or a numeric identifier, arg
and value
, with each row containing
one function evaluation at the original arg
-values.
for as.matrix.tf
: a matrix with one row per function and one
column per arg
.
for as.function.tf
: an R function with argument arg
that
evaluates x
on arg
and returns the list of function values