filter.duckplyr_df | R Documentation |
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 [
.
## S3 method for class 'duckplyr_df'
filter(.data, ..., .by = NULL, .preserve = FALSE)
.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 |
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.
dplyr::filter()
df <- duckdb_tibble(x = 1:3, y = 3:1)
filter(df, x >= 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.