filter: Return rows with matching conditions

Description Usage Arguments Value Examples

Description

Use filter() to choose rows/cases where conditions are true. Unlike base subsetting with [, rows where the condition evaluates to NA are dropped.

Usage

1
2
3
4
5
6
## S3 method for class 'FDF'
filter(.data, ...)

filter_int(.data, subset, check = TRUE)

filter(.data, ..., .preserve = TRUE)

Arguments

.data

A FDF.

...

Logical predicates defined in terms of the variables in .data. Multiple conditions are combined with &. Only rows where the condition evaluates to TRUE are kept.

The arguments in ... are automatically quoted and evaluated in the context of the data frame. They support unquoting and splicing. See vignette("programming") for an introduction to these concepts.

subset

Integer vector to (further) subset .data$ind_row.

check

Whether to check subset? Default is TRUE.

.preserve

when TRUE (the default), the grouping structure is preserved, otherwise it is recalculated based on the resulting data.

Value

An object of the same class as .data.

Examples

1
2
3
4
(test <- FDF(datasets::iris))
filter(test, Species == "setosa")
filter(test, Species == "setosa", Sepal.Length < 5)
filter_int(test, 1:50)

privefl/bigdfr documentation built on May 20, 2019, 9:39 a.m.