bapply() is a wrapper for vapply() that enforces FUN.VALUE = logical(1).

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.

Value

logical.

Note

  • FUN.VALUE is always set to logical(1).

  • USE.NAMES is always set to TRUE.

Updated 2021-02-23.

See also

Examples

bapply(X = list(a = "example", b = 1), FUN = is.character)
#> a b #> TRUE FALSE