Description Usage Arguments Value Examples
Execute code in the datasets environment for all values of a vector, replacing a macro with the value in each iteration
1 | forval(values, expr, macro = "%val")
|
values |
the vector of values to loop over. For example, specifying 1:5 would loop over integers from 1 to 5. |
expr |
a quoted expression (the experession must be enclosed in quotes) to evaluate in the loop which (presumably) uses the macro expression |
macro |
a word to replace in the quoted expression with the values we are looping over (default: "%val") |
returns NULL, invisibly
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.