filterDataSingle: Filter data for a single filter

Description Usage Arguments Value Author(s)

View source: R/dataManipulation-filterData.R

Description

Filter data for a single filter

Usage

1
2
3
4
5
6
7
8
filterDataSingle(
  data,
  filters,
  keepNA = TRUE,
  returnAll = FALSE,
  labelVars = NULL,
  labelData = "data"
)

Arguments

data

Data.frame with data.

filters

Unique filter or list of filters.

keepNA

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.

returnAll

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

labelVars

Named character vector containing variable labels.

labelData

(optional) String with label for input data, that will be included in progress messages.

Value

Updated data.

Author(s)

Laure Cougnaud


clinDataReview documentation built on July 14, 2021, 5:08 p.m.