detect_fixed_variables: Detect fixed variables

View source: R/detect_fixed_variables.R

detect_fixed_variablesR Documentation

Detect fixed variables

Description

Detects variables that have a fixed value in the rule set. To simplify a rule set, these variables can be substituted with their value.

Usage

detect_fixed_variables(x, eps = x$options("lin.eq.eps"), ...)

Arguments

x

validator object with the validation rules.

eps

detected fixed values will have this precission.

...

not used.

See Also

simplify_fixed_variables

Other redundancy: detect_redundancy(), is_implied_by(), remove_redundancy(), simplify_fixed_variables(), simplify_rules()

Examples

library(validate)
rules <- validator( x >= 0
                  , x <= 0
                  )
detect_fixed_variables(rules)
simplify_fixed_variables(rules)

rules <- validator( x1 + x2 + x3 == 0
                  , x1 + x2 >= 0
                  , x3 >= 0
                  )
simplify_fixed_variables(rules)

validatetools documentation built on Oct. 1, 2023, 1:06 a.m.