Randomly partitions data into two or more subsets according to the supplied
ratios. Optionally, stratified partitioning can be performed using a categorical
or numerical variable.
A numeric vector specifying the proportions of observations assigned to the partitions.
strata
Optional variable used for stratified partitioning. For categorical variables, the proportions of the levels are approximately preserved across partitions. For numerical variables, observations are
distributed across partitions according to their ordered values.
set.seed
A single value, interpreted as an integer, or NULL.