expect_range

DataFrame numeric column closed range bounds assertion

Passes if all non-NA cell values in a numeric DataFrame column fall within [min, max].

Parameters

Returns

Expect_pass when within bounds; Expect_hold on NA; Expect_stop if out of bounds.

Examples

assert(expect_range(df, "age", 0, 120))

See Also

expect_values, expect_between