Splits stratum into two parts. For more information
about splitting options, and an extensive list of examples, see
get_split_indexes_from_stratum.
Usage
split_stratum(stratum, ...)
Arguments
stratum
(data frame, tibble, list, or vector) Stratum to split;
dataframes and tibbles are counted and split by row. All other data types
are counted and split by element
(character) Splitting method. Note that first_second and
odd_even splitting method will only deliver a valid split with
default settings for other arguments (subsample_p = 1, split_p = 1,
replace = TRUE)
replace
(logical) If FALSE, splits are constructed by sampling from
stratum without replacement. If TRUE, stratum is sampled with replacement.
split_p
(numeric) Desired joint size of both parts, expressed as a
proportion of the size of the subsampled stratum. If split_p
is larger than 1, and careful is FALSE, then parts are automatically
sampled with replacement
subsample_p
(numeric) Subsample a proportion of stratum to be
used in the split.
careful
(boolean) If TRUE, stop with an error when called with
arguments that may yield unexpected splits
Value
(list) List with two elements that contain each of the two parts of
stratum split in two.