Description Usage Arguments Value Examples
View source: R/generate_similar_vars.R
Create a vector of similar variable names
1 | generate_similar_vars(base_exp, affix, prefix = NULL, suffix = NULL)
|
base_exp |
String. Common phrase among variables |
affix |
Vector. Unique phrase to attach to base_exp |
prefix |
Boolean. Append attachment to the head of base_exp |
suffix |
Boolean. Append attachment to the tail of base_exp |
A vector of similar variable names. All variables names contain the affix.
1 2 3 | generate_similar_vars(base_exp = "m1_blood", affix = 1:10, suffix = TRUE)
generate_similar_vars(base_exp = "m1_blood", affix = c("weight", "height"), prefix = TRUE)
generate_similar_vars(base_exp = c("t0_month", "t1_month"), affix = 1:12, suffix = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.