form_homogeneous_subgroups {designit} | R Documentation |
Form groups and subgroups of 'homogeneous' samples as defined by certain variables and size constraints
Description
Form groups and subgroups of 'homogeneous' samples as defined by certain variables and size constraints
Usage
form_homogeneous_subgroups(
batch_container,
allocate_var,
keep_together_vars = c(),
n_min = NA,
n_max = NA,
n_ideal = NA,
subgroup_var_name = NULL,
prefer_big_groups = TRUE,
strict = TRUE
)
Arguments
batch_container |
Batch container with all samples assigned that are to be grouped and sub-grouped |
allocate_var |
Name of a variable in the |
keep_together_vars |
Vector of column names in sample table; groups are formed by pooling samples with identical values of all those variables |
n_min |
Minimal number of samples in one sub(!)group; by default 1 |
n_max |
Maximal number of samples in one sub(!)group; by default the size of the biggest group |
n_ideal |
Ideal number of samples in one sub(!)group; by default the floor or ceiling of |
subgroup_var_name |
An optional column name for the subgroups which are formed (or NULL) |
prefer_big_groups |
Boolean; indicating whether or not bigger subgroups should be preferred in case of several possibilities |
strict |
Boolean; if TRUE, subgroup size constraints have to be met strictly, implying the possibility of finding no solution at all |
Value
Subgroup object to be used in subsequent calls to compile_possible_subgroup_allocation()