plot_randomization: Plot Randomization Schedule

View source: R/plot_randomization.R

plot_randomizationR Documentation

Plot Randomization Schedule

Description

Creates a bar chart showing the number of subjects allocated to each treatment group.

Usage

plot_randomization(
  schedule,
  group_col = "Group",
  fill = "#2C7FB8",
  title = "Treatment Allocation"
)

Arguments

schedule

A data frame produced by ExpDesignR.

group_col

Character. Name of the treatment column.

fill

Character. Fill colour.

title

Character. Plot title.

Value

A ggplot object.

Examples

sch <- simple_randomization(
  n = 40,
  groups = c("Control","Treatment"),
  seed = 123
)

plot_randomization(sch)


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