make (dataloop)#


Specifies the creation of a new variable within a data loop.


make [#] numvar = numeric_expression;
make $charvar = character_expression;


make sqvpt = sqrt(velocity * pressure * temp);
make $ gender = lower(gender);


A numeric_expression is any valid expression returning a numeric vector. A character_expression is any valid expression returning a character vector. If neither ‘$’ nor ‘#’ is specified, ‘#’ is assumed.

The expression may contain explicit variable names and/or GAUSS commands. Any variables referenced must already exist, either as elements of the source dataset, as extern’s, or as the result of a previous Format, vector, or code statement. The variable name must be unique. A variable cannot be made more than once, or an error is generated.

See also

Functions vector