export_schedule: Export Randomization Schedule

View source: R/export_schedule.R

export_scheduleR Documentation

Export Randomization Schedule

Description

Export a randomization schedule to a CSV file.

Usage

export_schedule(schedule, file, row.names = FALSE)

Arguments

schedule

A data frame or tibble generated by ExpDesignR.

file

Character. Output CSV filename or path. This argument must be supplied explicitly.

row.names

Logical. Should row names be written?

Value

Invisibly returns the input schedule unchanged. The function writes the schedule to the CSV file specified by file.

Examples

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

tf <- tempfile(fileext = ".csv")

export_schedule(
  sch,
  file = tf
)

unlink(tf)


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