c_assert: Check assertions about data

View source: R/c_assert.R

c_assertR Documentation

Check assertions about data

Description

Check assertions about data.

Usage

c_assert(data, predicate, source, ...)

Arguments

data

A data frame.

predicate

A function that returns FALSE when violated.

source

Logical: TRUE or FALSE.

...

Comma-separated list of unquoted columns.

Value

If the predicate assertion is true, TRUE.

If the predicate assertion is false and source is TRUE, a data-frame with the offending rows.

If the predicate assertion is false and source is FALSE, an assertr data-frame.


zhaoy/zhaoy documentation built on Aug. 1, 2024, 7:59 p.m.