tf_spread | R Documentation |
tf
-column into many columns representing the
function evaluations.Similar in spirit to tidyr::spread()
, but does NOT shorten,
just widens the data frame – a tf
-column is spread out into many columns
containing the functional measurements.
tf_spread(data, value, arg, sep = "_", interpolate = FALSE)
data |
a data frame with at least one |
value |
the name of the |
arg |
(Semi-)optional. A vector of |
sep |
separating character used to create column names for the new columns,
defaults to |
interpolate |
|
a wider dataframe with the tf
-column spread out into many columns
each containing the functional measurements for one arg
-value.
Other tidyfun data wrangling functions:
tf_evaluate.data.frame()
,
tf_gather()
,
tf_nest()
,
tf_unnest()
d <- dplyr::tibble(g = 1:3)
d$f <- tf_rgp(3, 11L)
tf_spread(d, f)
tf_spread(d, -g)
tf_spread(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.