bapply: Boolean apply

View source: R/bapply.R

bapplyR Documentation

Boolean apply

Description

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.

Value

logical.

Note

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

  • USE.NAMES is always set to TRUE.

Updated 2021-02-23.

See Also

  • assertive.base::bapply().

  • vapply().

Examples

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

acidgenomics/r-goalie documentation built on Jan. 12, 2024, 4:15 a.m.