
Flag an SPSS "Select Cases" filter variable
Source:R/data_check_helpers.R
data_check_spss_filter.RdSPSS's Select Cases dialog creates a 0/1 variable named filter_$
(mangled to filter_. or filter_ by some importers). Its presence
matters to a re-user either way: if it is constant at 1 the file was
saved after deleting unselected cases, so the shared data are a
pre-filtered subset; if it varies, the reported analyses likely used only
the selected rows and the filter must be re-applied to reproduce them.
Examples
data_check_spss_filter("filter_$", rep(1, 30))$problem
#> [1] TRUE