Next: , Previous: , Up: Dictionaries   [Contents][Index]

2.6.7 Filter Variable

When the active dataset is read by a procedure, cases can be excluded from analysis based on the values of a filter variable. See FILTER in PSPP Users Guide, for a user view of filtering.

These functions store and retrieve the filter variable. They are rarely useful, because the data analysis framework automatically excludes from analysis the cases that should be filtered.

Function: struct variable * dict_get_filter (const struct dictionary *dict)

Returns dict’s current filter variable, or a null pointer if the dictionary does not have a filter variable.

Function: void dict_set_filter (struct dictionary *dict, struct variable *var)

Sets dict’s filter variable to var. If var is non-null, it must be a numeric variable in dict. If var is null, then dict’s filter variable, if any, is cleared.