Before the set of resamples created in each nest can be combined, they
must contain the same number of splits. For most resampling methods,
this will not be an issue. rsample::vfold_cv(), for example, reliably
creates the number of splits defined in its 'v' argument. However,
other resampling methods, like rsample::rolling_origin(), depend on
the size of their 'data' argument, and therefore may produce different
numbers of resamples when presented with differently sized nests.
The size_action argument defines many ways of matching the sizes of
resample sets with different numbers of splits. These methods will either try
to reduce the number of splits in each set until each rset is the same
length as the set with the lowest number of splits; or the opposite,
where each rset will have the same number of splits as the largest set.
"truncate", the default, means that all splits beyond the required
length will be removed.
"recycle" means that sets of splits will be extended by repeating
elements until the required length has been reached, mimicking the
process of vector recycling. The advantage of this method is that all
created splits will be preserved.
"recycle-random" is a similar process to recycling, but splits will be
copied at random to spaces in the output, which may be important if
the order of resamples matters. This process is not completely random,
and the program makes sure that every split is copied roughly the same
number of times.
"combine" gets rid of excess splits by combining them with previous ones.
This means the training and testing rows are merged into one split.
Combining is done systematically: if a set of splits needs to be
compacted down to a set of 5, the first split is combined with the
sixth split, then the eleventh, then the sixteenth, etc. This approach
is not recommended, since it is not clear what the benefit of a
combined split is.
"combine-random" combines each split with a random set of other splits,
instead of the systematic process described in the previous method.
Once again, this process is not actually random, and each split will
be combined with roughly the same number of other splits.
"combine-end" combines every excess split with the last non-excess
split.
"error" throws an error if each nest does not produce the same number
of splits.