View source: R/VERBS-filter_on.R
filter_on | R Documentation |
Helper to filter specifying the on
part of the data.table::data.table query.
filter_on(.data, ...)
## S3 method for class 'ExprBuilder'
filter_on(
.data,
...,
which = FALSE,
nomatch = getOption("datatable.nomatch"),
mult = "all",
.negate = FALSE,
.chain = getOption("table.express.chain", TRUE)
)
## S3 method for class 'data.table'
filter_on(.data, ..., .expr = FALSE)
.data |
An instance of ExprBuilder. |
... |
Key-value pairs, maybe with empty keys if the |
which, nomatch, mult |
See data.table::data.table. |
.negate |
Whether to negate the expression and search only for rows that don't contain the given values. |
.chain |
Logical. Should a new frame be automatically chained to the expression if the clause being set already exists? |
.expr |
If the input is a |
The key-value pairs in '...' are processed as follows:
The names are used as on
in the data.table
frame. If any name is empty, on
is left
missing.
The values are packed in a list and used as i
in the data.table
frame.
To see more examples, check the vignette, or the table.express-package entry.
data("mtcars")
data.table::as.data.table(mtcars) %>%
filter_on(cyl = 4, gear = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.