is_implied_by {validatetools} | R Documentation |
Find which rule(s) make rule_name redundant
Description
Find out which rules are causing rule_name(s) to be redundant.
Usage
is_implied_by(x, rule_name, ...)
Arguments
x |
|
rule_name |
|
... |
not used |
Value
character
with the names of the rule that cause the implication.
See Also
Other redundancy:
detect_fixed_variables()
,
detect_redundancy()
,
remove_redundancy()
,
simplify_fixed_variables()
,
simplify_rules()
Examples
rules <- validator( rule1 = x > 1
, rule2 = x > 2
)
# rule1 is superfluous
remove_redundancy(rules)
# rule 1 is implied by rule 2
is_implied_by(rules, "rule1")
rules <- validator( rule1 = x > 2
, rule2 = x > 2
)
# standout: rule1 and rule2, oldest rules wins
remove_redundancy(rules)
# Note that detection signifies both rules!
detect_redundancy(rules)
[Package validatetools version 0.5.2 Index]