test_batch: Validate or Generate Batch Assignments

View source: R/cram_helpers.R

test_batchR Documentation

Validate or Generate Batch Assignments

Description

This function validates a provided batch assignment or generates random batch assignments for individuals.

Usage

test_batch(batch, n)

Arguments

batch

Either an integer specifying the number of batches or a vector/list of batch assignments for all individuals.

n

An integer specifying the number of individuals in the population.

Value

A list containing:

batches

A list where each element contains the indices of individuals assigned to a specific batch.

nb_batch

The total number of batches.


cramR documentation built on Aug. 25, 2025, 1:12 a.m.