domain_check: Check Value Validity

View source: R/Domain_methods.R

domain_checkR Documentation

Check Value Validity

Description

checkmate-like check-function. Check whether a list of values is feasible in the domain. A value is feasible if it is of the same storage_type, inside of the bounds or element of special_vals. TuneTokens are generally not accepted, so they should be filtered out before the call, if present.

domain_check will return TRUE for accepted values, a character(1) error message otherwise.

domain_test will return TRUE for accepted values, FALSE otherwise.

domain_assert will return the param argument silently for accepted values, and throw an error message otherwise.

Usage

domain_check(param, values)

domain_assert(param, values, .var.name = checkmate::vname(param), add = NULL)

domain_test(param, values)

Arguments

x

(any).

Value

If successful TRUE, if not a string with the error message.


mlr-org/phng documentation built on April 22, 2024, 4:34 p.m.