bapply()
is a wrapper for vapply()
that enforces
FUN.VALUE = logical(1)
.
Usage
bapply(X, FUN, ..., USE.NAMES = TRUE)
Arguments
- X
atomic
or list
.
- FUN
function
.
An assert check function that returns logical(1)
boolean flag
(TRUE
/FALSE
) to apply.
- ...
Additional arguments passed to vapply().
- USE.NAMES
logical(1)
.
If TRUE
and X
is character, use X
as names
for the
result, unless it has names already.
Examples
bapply(X = list(a = "example", b = 1), FUN = is.character)
#> a b
#> TRUE FALSE