Learn R Programming

golfr (version 0.1.0)

MakeGroups: Assign every student into groups with set number of students per group

Description

Assign every student into groups with set number of students per group, with set number of iterations (overlap not considered)

Usage

MakeGroups(data, students_per_group, iterations, initial_matrix)

Value

data frame

Arguments

data

a data frame

students_per_group

a positive integer

iterations

a positive integer

initial_matrix

matrix generated with `initmat()`

Examples

Run this code
# Assign 9 students into 3 groups of 3, with 3 iterations
data <- GenerateData(9)
M <- initmat(data$Student)
MakeGroups(data, 3, 3, M)

Run the code above in your browser using DataLab