Filter data for a single filter
filterDataSingle(
data,
filters,
keepNA = TRUE,
returnAll = FALSE,
labelVars = NULL,
labelData = "data"
)
Updated data
with attributes:
'labelVars': input labelVars
with any new variables
if labelNew
is specified.
'msg': message describing the filtering process
'warn': warning describing the filtering process
Data.frame with data.
Unique filter or list of filters.
Logical, if TRUE (by default) missing values in var
are retained.
If set to FALSE, missing values are ignored for all filters.
The specification within filters
prevails on this parameter.
Logical:
if FALSE (by default): the data
for only the filtered records
is returned.
if TRUE: the full data
is returned.
Records are flagged based on the filters
condition, in a new column:
varNew
(if specified), or 'keep' otherwise; containing TRUE
if the record fulfill all conditions, FALSE otherwise
Named character vector containing variable labels.
(optional) String with label for input data
,
that will be included in progress messages.
Laure Cougnaud