make_groups: Make groups

Description Usage Arguments

View source: R/make_groups.R

Description

Make groups by specifying the population size, the group size and other parameters.

Usage

1
2
make_groups(.data, group_size, alt_group_size = "larger",
  groups_col = NULL)

Arguments

.data

A 2-dimensional structure (e.g. data frame, tibble, data.table, ...) that contains information about the population to be assigned into groups.

group_size

An integer specifying the desired group size.

alt_group_size

A character value taking "smaller" or "larger" to specify whether smaller or larger groups should be formed in case of imperfect scenarios.

groups_col

A character value specifying whether a column in .data already exist. This is useful if the data already has observations already assigned to groups groups. In this case, the observations with no group should have NA.


gueyenono/professorrr documentation built on Dec. 26, 2021, 10:10 p.m.