@@ -108,9 +108,9 @@ The function `simplify_rules` combines most simplification methods of
108108following rule set to a simpler form:
109109
110110``` r
111- rules <- validator( if (age < 16 ) income == 0
112- , job %in% c(" yes" , " no" )
113- , if (job == " yes" ) income > 0
111+ rules <- validator( rule1 = if (age < 16 ) income == 0
112+ , rule2 = job %in% c(" yes" , " no" )
113+ , rule3 = if (job == " yes" ) income > 0
114114 )
115115simplify_rules(rules , age = 13 )
116116# > Object of class 'validator' with 3 elements:
@@ -120,8 +120,8 @@ simplify_rules(rules, age = 13)
120120# or
121121simplify_rules(rules , job = " yes" )
122122# > Object of class 'validator' with 3 elements:
123- # > V1 : age >= 16
124- # > V3 : income > 0
123+ # > rule1 : age >= 16
124+ # > rule3 : income > 0
125125# > .const_job: job == "yes"
126126```
127127
@@ -147,7 +147,7 @@ substitute_values(rules, height = 6, gender = "male")
147147### Finding fixed values
148148
149149``` r
150- rules <- validator( x > = 0 , x < = 0 )
150+ rules <- validator( rule1 = x > = 0 , rule2 = x < = 0 )
151151detect_fixed_variables(rules )
152152# > $x
153153# > [1] 0
@@ -181,13 +181,13 @@ simplify_conditional(rules)
181181
182182
183183# non-constraining clause
184- rules <- validator( if (age < 16 ) income == 0
185- , if (age > = 16 ) income > = 0
184+ rules <- validator( rule1 = if (age < 16 ) income == 0
185+ , rule2 = if (age > = 16 ) income > = 0
186186 )
187187simplify_conditional(rules )
188188# > Object of class 'validator' with 2 elements:
189- # > V1 : age >= 16 | (income == 0)
190- # > V2 : income >= 0
189+ # > rule1 : age >= 16 | (income == 0)
190+ # > rule2 : income >= 0
191191```
192192
193193### Removing redundant rules
0 commit comments