Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.7.0, release v0.7.0

DO REPEAT

Repeat transformations with stand-in names replaced by variables or values.

Syntax

DO REPEAT standin = varlist | values [/ standin = varlist | values ...].
  transformation commands
END REPEAT [PRINT].
Every list must have as many items; the commands run once per item, each stand-in
replaced by its item. A list holds existing variables (TO in file order, ALL) or new
names (v1 TO v5), or numbers and quoted strings (1 TO 5 counts up). PRINT shows the
generated commands.

Example

DO REPEAT r = region1 TO region5 / v = 1 TO 5.
COMPUTE r = (region = v).
END REPEAT.

statscraft help DO REPEAT prints the same text in the terminal. All commands