extract_shuffle_params {designit} | R Documentation |
Extract relevant parameters from a generic shuffle function output
Description
Any shuffling function should return one of the following:
atomic index vector for a direct location assignment
a list with src and dst vector
a list with locations vector (for location assignment) and optional sample_attr data frame/tibble
Usage
extract_shuffle_params(shuffle, attributes_expected)
Arguments
shuffle |
Return value of a shuffle function |
attributes_expected |
Logical; if TRUE, sample attributes are expected from the shuffling result and the function dies if they are not provided. |
Details
This function parses the output, performs a few checks and returns results in a simple-to-use list.
Value
A list with components src, dst, location_assignment and samples_attr, depending on the output of the specific shuffling function
[Package designit version 0.5.0 Index]