EQUAL

Purpose:

Determines if two expressions are equal.

Syntax:

EQUAL(val1, val2)

val1

-

A scalar, series, or table.

val2

-

A scalar, series, or table.

Returns:

A scalar, series, or table containing a 1 when the condition is true and 0 when the condition is false.

Example:

equal(W1, W2)

 

returns a series containing a 1 for every observation where W1 is equal to W2, or a 0 if they are not.

Example:

equal({1, 5, 3, 2}, max({1, 5}))

 

returns a series {0, 1, 0, 0}.

 

This is equivalent to:

 

{1, 5, 3, 2} == max({1, 5})

Remarks:

The == is the operator equivalent of EQUAL.

See Also:

< <= > >= == != (Conditional Operators)

&& || ! AND OR NOT XOR (Logical Operators)