simplify_rules {validatetools}R Documentation

Simplify a rule set

Description

Simplifies a rule set set by applying different simplification methods. This is a convenience function that works in common cases. The following simplification methods are executed:

For more control, these methods can be called separately.

Usage

simplify_rules(.x, .values = list(...), ...)

Arguments

.x

validator object with the rules to be simplified.

.values

optional named list with values that will be substituted.

...

parameters that will be used to substitute values.

See Also

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

Examples

rules <- validator( x > 0
                  , if (x > 0) y == 1
                  , A %in% c("a1", "a2")
                  , if (A == "a1") y > 1
                  )

simplify_rules(rules)


[Package validatetools version 0.5.2 Index]