
Last chance! 50% off unlimited learning
Sale ends in
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)add_to_split_result(splres, values, datasplit, labels, extras = NULL)
a named list representing the facets generated by the split
with elements values
, datasplit
, and labels
, which are
the same length and correspond to eachother elementwise.
character or list(SplitValue). The values associated with each facet
list(data.frame). The facet data for each facet generated in the split
character. The labels associated with each facet
NULL or list. Extra values associated with each of the facets which will be passed to analysis functions applied within the facet.
list. A list representing the result of splitting.
These functions does various housekeeping to ensure that the split result list is as the rtables internals expect it, most of which are not relevant to end users.
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"))
splres2 <- add_to_split_result(splres,
values = "med",
datasplit = list(med = mtcars[1:20,]),
labels = "kinda some data")
Run the code above in your browser using DataLab