randomizeToTreatment: Randomly assign subjects to treatment conditions

Description Usage Arguments Value Examples

View source: R/randomizeToTreatment.R

Description

Randomly assign subjects to treatment conditions

Usage

1
randomizeToTreatment(n, treatments = c("C", "T"), weights)

Arguments

n

The number of subjects

weights

An optional argument that allows users to change the ratio of subjects in each condition

treatment

A vector of available treatment options. Defaults to c("C", "T")

Value

A vector of treatment assignments

Examples

1
2
randomizeToTreatment(20, c("C", "T1", "T2"))
randomizeToTreatment(20, c("C", "T1", "T2"), c(0.5, 0.25, 0.25))

sf585978/RedditRandomizer documentation built on May 3, 2019, 10:44 p.m.