filter.duckplyr_df {duckplyr} | R Documentation |
Keep rows that match a condition
Description
This is a method for the dplyr::filter()
generic.
See "Fallbacks" section for differences in implementation.
The filter()
function is used to subset a data frame,
retaining all rows that satisfy your conditions.
To be retained, the row must produce a value of TRUE
for all conditions.
Note that when a condition evaluates to NA
the row will be dropped,
unlike base subsetting with [
.
Usage
## S3 method for class 'duckplyr_df'
filter(.data, ..., .by = NULL, .preserve = FALSE)
Arguments
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
... |
< |
.by |
< |
.preserve |
Relevant when the |
Fallbacks
There is no DuckDB translation in filter.duckplyr_df()
with no filter conditions,
nor for a grouped operation (if
.by
is set).
These features fall back to dplyr::filter()
, see vignette("fallback")
for details.
See Also
Examples
df <- duckdb_tibble(x = 1:3, y = 3:1)
filter(df, x >= 2)