Use filter() to choose rows/cases where conditions are TRUE.
Usage
filter(.data, ..., .preserve = FALSE)
Value
A data.frame.
Arguments
.data
A data.frame.
...
Logical predicated defined in terms of the variables in .data. Multiple conditions are combined with
&. Arguments within ... are automatically quoted and evaluated within the context of the data.frame.
.preserve
logical(1). Relevant when the .data input is grouped. If .preserve = FALSE (the default), the
grouping structure is recalculated based on the resulting data, otherwise the grouping is kept as is.