% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/verbs_basic.R
\name{filter}
\alias{filter}
\title{Filter rows of a vectra query}
\usage{
filter(.data, ...)
}
\arguments{
\item{.data}{A \code{vectra_node} object.}

\item{...}{Filter expressions (combined with \code{&}).}
}
\value{
A new \code{vectra_node} with the filter applied.
}
\description{
Filter rows of a vectra query
}
\details{
Filter uses zero-copy selection vectors: matching rows are indexed without
copying data. Multiple conditions are combined with \code{&}. Supported
expression types: arithmetic (\code{+}, \code{-}, \code{*}, \code{/}, \code{\%\%}), comparison
(\code{==}, \code{!=}, \code{<}, \code{<=}, \code{>}, \code{>=}), boolean (\code{&}, \code{|}, \code{!}), \code{is.na()},
and string functions (\code{nchar()}, \code{substr()}, \code{grepl()} with fixed patterns).

NA comparisons return NA (SQL semantics). Use \code{is.na()} to filter NAs
explicitly.

This is a streaming operation (constant memory per batch).
}
\examples{
f <- tempfile(fileext = ".vtr")
write_vtr(mtcars, f)
tbl(f) |> filter(cyl > 4) |> collect() |> head()
unlink(f)

}
