Description Usage Arguments Value Examples
View source: R/randomizeToTreatment.R
Randomly assign subjects to treatment conditions
1 | randomizeToTreatment(n, treatments = c("C", "T"), weights)
|
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") |
A vector of treatment assignments
1 2 | randomizeToTreatment(20, c("C", "T1", "T2"))
randomizeToTreatment(20, c("C", "T1", "T2"), c(0.5, 0.25, 0.25))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.