WEED inputVector test resultVariable

Replaces the contents of the result variable with only those values from the input vector that do NOT satisfy the test. Those values that satisfy the test are "weeded out."

Don't let the command name fool you. It can also be thought of as selecting the values you want and putting them in the resultVariable. All you have to do is use the complementary test. See the example at right.

See also: TAGS.

COPY (1 2 3 4 3 2 5 1 4) data
WEED data = 3 subset
WEED data <> 3 complementarySubset
PRINT subset complementarySubset

The above program produced the following result:

subset: (1.0 2.0 4.0 2.0 5.0 1.0 4.0)
complementarySubset: (3.0 3.0)