Clause for subsetting rows.
where(.data, ...) # S3 method for ExprBuilder where(.data, ..., which, .collapse = `&`, .parse = getOption("table.express.parse", FALSE), .chain = getOption("table.express.chain", TRUE)) # S3 method for data.table where(.data, ...)
.data | The input data. |
---|---|
... | Arguments for the specific methods. |
which | Passed to data.table::data.table. |
.collapse | A boolean function which will be used to "concatenate" all conditions in |
.parse | Logical. Whether to apply |
.chain | Logical. Should a new frame be automatically chained to the expression if the clause being set already exists? |
For ExprBuilder, the expressions in ...
can call nest_expr()
, and are eagerly nested if
they do.
The data.table::data.table method is lazy, so it expects another verb to follow afterwards.
To see more examples, check the vignette, or the table.express-package entry.
#> .DT_[vs == 0 & am == 1]#> mpg #> 1: 21 #> 2: 21 #> 3: 19 #> 4: 14 #> 5: 16 #> 6: 17 #> 7: 15 #> 8: 10 #> 9: 10 #> 10: 15 #> 11: 16 #> 12: 15 #> 13: 13 #> 14: 19 #> 15: 26 #> 16: 16 #> 17: 20 #> 18: 15