validateValueDomain: Validate Value domains

View source: R/SurveyUtil.r

validateValueDomainR Documentation

Validate Value domains

Description

A helper function for validating data within a pre-defined set of possible values.

Usage

validateValueDomain(
  values,
  domain,
  error_message = "The following values are invalid:\n\n%s\n\n"
)

Arguments

values

The data that is to be validated

domain

The set of valid values that "values" can take on.

error_message

A template of a printf message for invalid values.

Value

The values provided

Note

If the values vector contains values that are not in the domain vector, then the method calls stop with an error message using the template provide in the "error_message" parameter.


Pacific-salmon-assess/iRecAnalysisPkg documentation built on July 6, 2024, 5:03 p.m.