This function creates a character vector of treatment conditions
using the conditions column in the provided data, and if control_augment is greater
than 0, it also labels the control condition. Throws an error of control_condition is not
present.
create_conditions(control_condition, data, condition_col, control_augment)Character vector of unique treatment conditions. Throws error if an invalid specification is used.
Value of the control condition. Only necessary when control_augment is greater than 0. Internally this value
is coerced to a string, so it should be passed as a string, or a type that can easily be converted to a string.
A data.frame, data.table, or tibble containing input data from the trial. This should be the results of a traditional Randomized Controlled Trial (RCT). Any data.frames will be converted to tibbles internally.
Column in data; original treatment condition for each observation.
A numeric value ranging from 0 to 1; proportion of each wave guaranteed to receive the "Control" treatment.
Default is 0. It is not recommended to use this in conjunction with random_assign_prop.