Skip to contents

Randomly assigns a patient to one of the arms according to specified ratios, regardless of already performed assignments.

Usage

randomize_simple(arms, ratio)

Arguments

arms

character()
Arm names.

ratio

integer()
Vector of positive integers (0 is allowed), equal in length to number of arms, named after arms, defaults to equal weight

Value

Selected arm assignment.

Examples

randomize_simple(c("active", "placebo"), c("active" = 2, "placebo" = 1))
#> [1] "active"