powered by
This is a method for the dplyr filter() generic. It generates the WHERE clause of the SQL query.
filter()
WHERE
# S3 method for tbl_lazy filter(.data, ..., .by = NULL, .preserve = FALSE)
Another tbl_lazy. Use show_query() to see the generated query, and use collect() to execute the query and return data to R.
tbl_lazy
show_query()
collect()
A lazy data frame backed by a database query.
<data-masking> Variables, or functions of variables. Use desc() to sort a variable in descending order.
data-masking
desc()
<tidy-select> Optionally, a selection of columns to temporarily group by using an inline alternative to group_by().
tidy-select
group_by()
Not supported by this method.
library(dplyr, warn.conflicts = FALSE) db <- memdb_frame(x = c(2, NA, 5, NA, 10), y = 1:5) db %>% filter(x < 5) %>% show_query() db %>% filter(is.na(x)) %>% show_query()
Run the code above in your browser using DataLab