block_randomization: Block Randomization

View source: R/block_randomization.R

block_randomizationR Documentation

Block Randomization

Description

Generates a randomized allocation schedule using fixed block randomization.

Usage

block_randomization(n, groups, block_size = 4, seed = NULL)

Arguments

n

Total number of subjects.

groups

Character vector of treatment groups.

block_size

Size of each block. Must be a multiple of the number of treatment groups.

seed

Optional random seed.

Value

A tibble with subject allocation.

Examples

block_randomization(
  n = 24,
  groups = c("Control","Treatment"),
  block_size = 4,
  seed = 123
)


ExpDesignR documentation built on Aug. 27, 2026, 5:06 p.m.