Description Usage Arguments Value Examples
Given a base variable (base_var), side label (side_lab), and side location (side_loc), build the full left/right variable. Two examples follow.
(1) base_var = "var1" side_lab = "_L" side_loc = "end" ————— lr_var = "var1_L" [the output]
(2) base_var = "variable_two" side_lab = "right_" side_loc = "start" ————— lr_var = "right_variable_two" [the output]
1 | build_lr_var(base_var, side_loc, side_lab)
|
base_var |
The base variable name, a string |
side_loc |
The side location, a string ("start" or "end") approach) |
side_lab |
The side label, a string (prefix or affix) |
The resulting left/right variable
1 2 3 4 5 6 | # Call build_lr_var to specify left/right variable names
left_var <- build_lr_var("variable_name","start","L_")
print(left_var) # Expected output: "L_variable_name"
right_var <- build_lr_var("var_name","end","_right")
print(right_var) # Expected output: "var_name_right"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.