View source: R/make_split_fun.R
make_split_result | R Documentation |
These functions can be used to create or add to a split result in functions which implement core splitting or post-processing within a custom split function.
make_split_result(
values,
datasplit,
labels,
extras = NULL,
subset_exprs = vector("list", length(values))
)
add_to_split_result(
splres,
values,
datasplit,
labels,
extras = NULL,
subset_exprs = NULL
)
values |
( |
datasplit |
( |
labels |
( |
extras |
( |
subset_exprs |
( |
splres |
( |
These functions performs various housekeeping tasks to ensure that the split result list is as the rtables internals expect it, most of which are not relevant to end users.
A named list representing the facets generated by the split with elements values
, datasplit
, and
labels
, which are the same length and correspond to each other element-wise.
Other make_custom_split:
add_combo_facet()
,
drop_facet_levels()
,
make_split_fun()
,
trim_levels_in_facets()
Other make_custom_split:
add_combo_facet()
,
drop_facet_levels()
,
make_split_fun()
,
trim_levels_in_facets()
splres <- make_split_result(
values = c("hi", "lo"),
datasplit = list(hi = mtcars, lo = mtcars[1:10, ]),
labels = c("more data", "less data"),
subset_exprs = list(expression(TRUE), expression(seq_along(wt) <= 10))
)
splres2 <- add_to_split_result(splres,
values = "med",
datasplit = list(med = mtcars[1:20, ]),
labels = "kinda some data",
subset_exprs = quote(seq_along(wt) <= 20)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.