every {purrr} | R Documentation |
Do every or some elements of a list satisfy a predicate?
every(.x, .p, ...) some(.x, .p, ...)
.x |
A list or atomic vector. |
.p |
A single predicate function, a formula describing such a
predicate function, or a logical vector of the same length as |
... |
Additional arguments passed on to |
A logical vector of length 1.
x <- list(0, 1, TRUE) x %>% every(identity) x %>% some(identity) y <- list(0:10, 5.5) y %>% every(is.numeric) y %>% every(is.integer)