Skip to contents

Validates that all values in a column are among the allowed values.

Usage

require_col_one_of(restriction, col, values)

Arguments

restriction

a restriction object.

col

character(1) column name.

values

vector of allowed values.

Value

The modified restriction object.

Details

NA elements are skipped; use require_col_character(col, no_na = TRUE) (or the matching column type check) to reject them.