Specifies the beginning of a data loop.
dataloop infile outfile
Parameters: infile (string variable or literal) – the name of the source dataset. Returns: outfile (string variable or literal) – the name of the output dataset.
src = "source"; // Dataloop section dataloop ^src dest; make newvar = x1 + x2 + log(x3); x6 = sqrt(x4); keep x6, x5, newvar; endata;
src is a string variable requiring the caret (
dest is a string literal.
The statements between the
dataloop... endata commands are assumed to be
metacode to be translated at compile time. The data from infile is
manipulated by the specified statements, and stored to the dataset
outfile. Case is not significant within the
dataloop... endata section,
except for within quoted strings. Comments can be used as in any GAUSS code.