try_validator: Let a validator fail without an error

View source: R/inspector.R

try_validatorR Documentation

Let a validator fail without an error

Description

Let a validator fail without an error

Usage

try_validator(..., nam = "")

Arguments

nam

an optional name to help identify the failty validator later.

x

an expression that should tipically return a validator result but in some, yet to be discovered, exceptional cases, it does not.

Examples

x = data.table(id = 1:10)
wrong_output_validator <- nrow
faulty_validator <- function(x) foo(x)

faulty_validator (x) |> try_validator(nam = 'foo')
nrow(x) |> try_validator()


mpio-be/DataEntry.validation documentation built on June 2, 2022, 8:28 p.m.