add_index | R Documentation |
Adds arm indices (arms
, narms
) to a dataset and adds numeric identifiers for
agent and class (if included in the data).
add_index(data.ab, agents = NULL, treatments = NULL)
data.ab |
A data frame of arm-level data in "long" format containing the columns:
|
agents |
A character string of agent names used to force a particular agent ordering.
Default is |
treatments |
A character string of treatment names used to force a particular treatment ordering.
Default is |
A data frame similar to data.ab
but with additional columns:
arm
Arm identifiers coded for each study
narm
The total number of arms in each study
If agent
or class
are non-numeric or non-sequential (i.e. with missing numeric codes),
agents/classes in the returned data frame will be numbered and recoded to enforce sequential
numbering (a warning will be shown stating this).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.