Apply logical OR on a column
Description
Check if any boolean value in a Boolean column is TRUE
.
Usage
<Expr>$any(drop_nulls = TRUE)
Arguments
drop_nulls
|
Logical. Default TRUE, as name says. |
Value
Boolean literal
Examples
library(polars)
pl$DataFrame(
all = c(TRUE, TRUE),
any = c(TRUE, FALSE),
none = c(FALSE, FALSE)
)$select(
pl$all()$any()
)
#> shape: (1, 3)
#> ┌──────┬──────┬───────┐
#> │ all ┆ any ┆ none │
#> │ --- ┆ --- ┆ --- │
#> │ bool ┆ bool ┆ bool │
#> ╞══════╪══════╪═══════╡
#> │ true ┆ true ┆ false │
#> └──────┴──────┴───────┘