Skip to content

Commit 530e630

Browse files
committed
updating readme
1 parent f0e5855 commit 530e630

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ The function `simplify_rules` combines most simplification methods of `validatet
9191
For example, it reduces the following rule set to a simpler form:
9292

9393
```{r}
94-
rules <- validator( if (age < 16) income == 0
95-
, job %in% c("yes", "no")
96-
, if (job == "yes") income > 0
94+
rules <- validator( rule1 = if (age < 16) income == 0
95+
, rule2 = job %in% c("yes", "no")
96+
, rule3 = if (job == "yes") income > 0
9797
)
9898
simplify_rules(rules, age = 13)
9999
#or
@@ -117,7 +117,7 @@ substitute_values(rules, height = 6, gender = "male")
117117
### Finding fixed values
118118

119119
```{r}
120-
rules <- validator( x >= 0, x <=0)
120+
rules <- validator( rule1 = x >= 0, rule2 = x <=0)
121121
detect_fixed_variables(rules)
122122
simplify_fixed_variables(rules)
123123
@@ -140,8 +140,8 @@ simplify_conditional(rules)
140140
141141
142142
# non-constraining clause
143-
rules <- validator( if (age < 16) income == 0
144-
, if (age >=16) income >= 0
143+
rules <- validator( rule1 = if (age < 16) income == 0
144+
, rule2 = if (age >=16) income >= 0
145145
)
146146
simplify_conditional(rules)
147147
```

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ The function `simplify_rules` combines most simplification methods of
108108
following 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
)
115115
simplify_rules(rules, age = 13)
116116
#> Object of class 'validator' with 3 elements:
@@ -120,8 +120,8 @@ simplify_rules(rules, age = 13)
120120
#or
121121
simplify_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)
151151
detect_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
)
187187
simplify_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

Comments
 (0)