validate: Value(s) validation using partial matching

View source: R/validate.R

validateR Documentation

Value(s) validation using partial matching

Description

Value(s) validation using partial matching

Usage

validate(x, choices, name, several.ok = TRUE)

Arguments

x

The value(s) to validate

choices

A vector of candidate values

name

The name of the value being validated (used in error messages)

several.ok

(logical) Whether x can have more than one value. Default TRUE.

Examples

## Not run: 
 validate(x = "bird", choices = c("dog", "cat"), name = "pet")

## End(Not run)


salix-d/salixUtils documentation built on Aug. 14, 2024, 7:11 a.m.