| add_arms | R Documentation |
add one or more arms to a trial. This function can be used in two
scenarios: (1) adding arms right after a trial is created
(i.e., trial(...)). sample_ratio and arms added through
... must be of same length; (2) adding arms to an existing trial in
action functions of milestones.
This is a user-friendly wrapper of the member function of trial, i.e.,
Trials$add_arms(), which is used in vignettes. Users who are not
familiar with the concept of classes may consider using this wrapper
directly.
The trial captures an independent deep copy of every arm it registers.
Subsequent changes to the original arm object do not affect the trial,
and adaptations within the trial (e.g., update_generator()) do
not modify the original arm. Complete the configuration of an arm before
registering it. The copy covers the arm and endpoint objects themselves;
a mutable environment or R6 object captured by a generator function is
shared by design of R closures and is not isolated.
add_arms(trial, sample_ratio, ...)
trial |
a trial object returned by |
sample_ratio |
integer vector. Sample ratio for permuted block randomization. It will be appended to existing sample ratio in the trial. |
... |
one or more objects returned from |
no return value, called for its side effect of updating trial.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.