goalie: Define a goalie check classed return

View source: R/AllGenerators.R

goalieR Documentation

Define a goalie check classed return

Description

Define a goalie check classed return

Usage

goalie(object, cause)

Arguments

object

logical.

cause

character. Only applies when object vector contains any FALSE values. The cause attribute must be named. Cause values corresponding to TRUE must be set NA.

Value

All TRUE: logical. Any FALSE: goalie, which extends logical.

Note

Updated 2023-09-29.

Examples

## Any FALSE.
x <- goalie(
    object = c(FALSE, TRUE),
    cause = c("xxx", NA_character_)
)
print(x)
print(cause(x))

## All TRUE.
x <- goalie(rep(TRUE, 2L))
print(x)

steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.