forked from tidyverse/dplyr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilter.Rd
46 lines (39 loc) · 1.13 KB
/
filter.Rd
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
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manip.r
\name{filter}
\alias{filter}
\alias{filter_}
\title{Return rows with matching conditions.}
\usage{
filter(.data, ...)
filter_(.data, ..., .dots)
}
\arguments{
\item{.data}{A tbl. All main verbs are S3 generics and provide methods
for \code{\link{tbl_df}}, \code{\link{tbl_dt}} and \code{\link{tbl_sql}}.}
\item{...}{Logical predicates. Multiple conditions are combined with \code{&}.}
\item{.dots}{Used to work around non-standard evaluation. See
\code{vignette("nse")} for details.}
}
\value{
An object of the same class as \code{.data}.
Data frame row names are silently dropped. To preserve, convert to an
explicit variable.
}
\description{
Return rows with matching conditions.
}
\examples{
filter(mtcars, cyl == 8)
filter(mtcars, cyl < 6)
# Multiple criteria
filter(mtcars, cyl < 6 & vs == 1)
filter(mtcars, cyl < 6 | vs == 1)
# Multiple arguments are equivalent to and
filter(mtcars, cyl < 6, vs == 1)
}
\seealso{
Other single.table.verbs: \code{\link{arrange}},
\code{\link{mutate}}, \code{\link{select}},
\code{\link{slice}}, \code{\link{summarise}}
}