tf_nest | R Documentation |
tf
-objectsSimilar in spirit to tidyr::nest()
. This turns tables in "long" format,
where one column (.id
) defines the unit of observation, one column (.arg
)
defines the evaluation grids of the functional observations, and other columns (...
)
define the values of the functions at those points into a (much shorter) table containing
tfd
-objects. All other variables are checked for constancy over .id
and
appended as well.
tf_nest(
data,
...,
.id = "id",
.arg = "arg",
domain = NULL,
evaluator = "tf_approx_linear"
)
data |
a data frame |
... |
A selection of columns. If empty, all variables except the
|
.id |
the (bare or quoted) name of the column defining the different observations. Defaults to "id". |
.arg |
the (bare or quoted) name of the column defining the |
domain |
optional. Range of possible |
evaluator |
optional. A function accepting arguments x, arg, evaluations. See |
domain
and evaluator
can be specified as lists or vectors
if you're nesting multiple functional data columns with different properties.
Because quasi-quotation is such a bitch, you can only specify the evaluator
functions as strings and not as bare names here.
a data frame with (at least) .id
and tfd
columns
tfd() for domain, evaluator
Other tidyfun data wrangling functions:
tf_evaluate.data.frame()
,
tf_gather()
,
tf_spread()
,
tf_unnest()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.