1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/verb-filter.R
\name{filter.tbl_lazy}
\alias{filter.tbl_lazy}
\title{Subset rows using column values}
\usage{
\method{filter}{tbl_lazy}(.data, ..., .by = NULL, .preserve = FALSE)
}
\arguments{
\item{.data}{A lazy data frame backed by a database query.}
\item{...}{<\code{\link[dplyr:dplyr_data_masking]{data-masking}}> Variables, or functions of
variables. Use \code{\link[dplyr:desc]{desc()}} to sort a variable in descending order.}
\item{.by}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
<\code{\link[=dplyr_tidy_select]{tidy-select}}> Optionally, a selection of columns to
temporarily group by using an inline alternative to \code{\link[=group_by]{group_by()}}.}
\item{.preserve}{Not supported by this method.}
}
\value{
Another \code{tbl_lazy}. Use \code{\link[=show_query]{show_query()}} to see the generated
query, and use \code{\link[=collect.tbl_sql]{collect()}} to execute the query
and return data to R.
}
\description{
This is a method for the dplyr \code{\link[=filter]{filter()}} generic. It generates the
\code{WHERE} clause of the SQL query.
}
\examples{
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()
}
|